Skip to content

Commit

Permalink
developers and sound edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mclarekin committed Oct 30, 2020
1 parent 7f0a205 commit e7318ae
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 34 deletions.
30 changes: 12 additions & 18 deletions mandelbulber2/manual/chapters/developers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

\section{Developer information}\label{developers}\index{Developer Information}

The Mandelbulber team welcomes everyone who likes to help us with the development of the software.
Whether you are a C++ fan and want to implement new features or you like to tweak the fractal formulas.
The Mandelbulber team welcomes anyyone who would like to help us with the development of the software, by using C++ to implement new features or fractal formulas.
The code base is well structured and can be compiled with most common compilers and operation systems.
No magic involved, you just need to learn the tools and utilities to modify and run your own version of Mandelbulber.

Expand Down Expand Up @@ -80,12 +79,11 @@ \subsubsection{Writing formula code}\label{developers-writing-formula-code}

\begin{itemize}
\item nameInComboBox: Displayed name of the fractal
\item internalName: internal name of the fractal. The same name is used for UI files
\item internalID: the same name as in enumFractalFormula
\item 4th field: The function name as defined in fractal\_formulas.cpp
\item DEType: Preferred distance estimation method. The deltaDE method needs more computation time but doesn't need analytical DE coding knowledge.
\item internalName: internal name of the fractal. The same name is used for the UI files
\item internalID: fractal, double colon, then name from formula/definition/all\_fractal\_list\_enums.cpp
\item DEType: Preferred distance estimation method. The deltaDE method needs more computation time but doesn't need analytical DE coding knowledge
\item DEFunctionType: Preferred distance estimation function
\item cpixelAddition: TODO
\item cpixelAddition: Whether cpixel addition is enabled for the formula
\item defaultBailout: Default bailout value
\item DEAnalyticFunction: Final calculation type
\item coloringFunction: Coloring function
Expand All @@ -104,23 +102,19 @@ \subsubsection{Writing formula code}\label{developers-writing-formula-code}
needed for instance to calculate estimated distance
\end{itemize}

All parameters and data structures are defined in fractal.h
\textbf{fractal.h.} All parameters and data structures are declared in fractal.h. In struct sFractalTransformCommon there is a list of common parameters that can be used. If you add a new formula, then try to utilize these existing names. If there is nothing which fits to your needs, then add a new one.

- initparameters.cpp:499
\textbf{initparameters.cpp.} The UI parameters are defined in initparameters.cpp. These are used in the UI and in the settings files.

\begin{lstlisting}
void InitFractalParams(cParameterContainer *par)
\end{lstlisting}
\textbf{fractal.cpp}. This file links the formula parameters to the parameters used in the UI and settings files.

- here are definition of names of parameters which are used in UI and settings files. If you add new formula then try to utilize existing names. If there is nothing which fits to your needs, then add a new one

- fractal.cpp, fractal.hpp - here are data structures for fractal parameters. There is also copying of values from internal parameter representation to data structures which you use in fractal functions

\subsubsection{Designing user interface}\label{developers-designing-user-interface}

To create UI files you can use Qt Designer application. The best would be if you make them based on existing files. All ui files are located in formula/ui folder. Names start with fractal\_ and the rest of name is the same as internal fractal name. Even if a formula doesn't use any parameters, you need to create an UI file with no adjustable input fields, see fractal\_quaternion.ui for example (some kind of dummy).
To create UI files, you can use Qt Designer application. The best would be if you make them based on existing files. All UI files are located in formula/ui folder. Names start with fractal\_ and the rest of name is the same as internal fractal name. Even if a formula doesn't use any parameters, you need to create an UI file with no adjustable input fields, see fractal\_quaternion.ui for example (some kind of dummy).

In the UI files the names of the edit fields define their type and their parameter reference. The program connects automatically edit fields with adequate parameters and with sliders / knobs. But to make it working first part of the name must describe type of edit widget. Use following prefixes:
In the UI files, the names of the edit fields define their type and their parameter reference. The program automatically connects edit fields with adequate parameters and with sliders, spinboxes, checkBoxes and knobs . But to make it work, the first part of the name must describe type of edit widget. Use the following prefixes:
\begin{itemize}
\item spinbox\_ - scalar value
\item slider\_ - slider for scalar value
Expand All @@ -135,8 +129,8 @@ \subsubsection{Designing user interface}\label{developers-designing-user-interfa
\item vect3 - 3d vector (related to CVector3 data type). Name must ends with axis name
\end{itemize}

The rest of the names of the edit field must be the same as defined in initparameters.cpp
The rest of the names of the edit field must be the same as defined in initparameters.cpp.

\subsubsection{Autogeneration of opencl formula code}\label{developers-autogen-opencl-formulas}
\subsubsection{Autogeneration of OpenCL formula code}\label{developers-autogen-opencl-formulas}

TODO
2 changes: 1 addition & 1 deletion mandelbulber2/manual/chapters/opencl.tex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ \subsubsection{Setup of OpenCL on Windows}\label{setup-opencl-windows}
Proceed with \ref{configure-opencl}.

\subsubsection{Setup of OpenCL on Linux}\label{setup-opencl-linux}
With a capable GPU and a recent driver, the Mandelbulber program can loaded.
With a capable GPU and a recent driver, the Mandelbulber program can be loaded.
Proceed with \ref{configure-opencl}.
If you are a developer and compile your own Mandelbulber version,
you will need to have the package \textbf{opencl-headers} installed in the system.
Expand Down
29 changes: 14 additions & 15 deletions mandelbulber2/sound/sound.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ \section{Using ``Anim By Sound'' with multiple

\emph{Keyframe animation requires changes to be made at keyframes. It is
possible with Sound animation to make changes at any frame, (i.e. a
change at any 1 / 30 of a second time interval, when at 30fps.)}
change at any 1 / 30 of a second time interval, when at 30 fps.)}

\emph{Previously, choreographing parameters with spreadsheets was very
time consuming and I was limited to what I could achieve, so I stopped
Expand All @@ -46,7 +46,7 @@ \section{Using ``Anim By Sound'' with multiple

http://cdn.mandelbulber.org/doc/audio/9\%20tut.zip

unzip and place ``9 tut'' folder in home/mandelbulber/animations/
Unzip and place ``9 tut'' folder in home/mandelbulber/animations/

\subsection{Audio Files}\label{audio-files}

Expand All @@ -61,9 +61,8 @@ \subsection{Audio Files}\label{audio-files}
- *.mp3 (MPEG II Audio Layer 3)

I used Hydrogen Drum Kit emulator to make all the individual drum track
files. These are .wav files but as I am using Linux I converted them to
.mp3 to use in Mandelbulber. These are mono working files, when I make
the video in VirtualDub I then use the final song mix .wav file.
files. These are .wav files which I have converted them to
.mp3 to use in Mandelbulber. These are mono working files, but when I make the video in VirtualDub, I then use the final song mix .wav file.

The guitar tracks have also been recorded as .wav, and a .mp3 copy made
to use with Mandelbulber.
Expand All @@ -87,10 +86,10 @@ \subsection{Audio Files}\label{audio-files}

\subsection{Adding a parameter.}\label{adding-a-parameter.}

Firstly, have the Animation Dock open. ( i.e. from menu select View -
Firstly, have the Animation Dock open. ( i.e., from menu select View -
show animation dock.)

Then go to the dock or tab for the parameter you wish to animate (e.g.
Then go to the dock or tab for the parameter you wish to animate (e.g.,
fractal, material, effect etc). Right mouse click on the parameter
field, and select Add to Keyframe Animation.

Expand All @@ -103,7 +102,7 @@ \subsection{Adding a parameter.}\label{adding-a-parameter.}

fractal0\_transf\_addition\_constant\_y

i.e parameter name \emph{transf\_addition\_constant\_y;} from formula
i.e., parameter name \emph{transf\_addition\_constant\_y;} from formula
slot \emph{fractal0.}

Parameters x \& z are also added because this parameter is part of a
Expand All @@ -127,7 +126,7 @@ \subsection{Loading the Audio File}\label{loading-the-audio-file}
soundVal = (paraVal * multiplication-factor * \emph{sound)} + (
addition-factor * \emph{sound})

It is less complicated when learning, to use only the addition factor,
Maybe it is less complicated when learning, to use only the addition factor,
so we change multiplication factor to 0.0.

\subsection{Using Sound Pitch mode.}\label{using-sound-pitch-mode.}
Expand All @@ -145,7 +144,7 @@ \subsection{Using Sound Pitch mode.}\label{using-sound-pitch-mode.}
that does not cover the full spectrum of the fundamental notes used in
the audio track.

In Pitch mode the Sound Animation chart rises from silent to high pitch.
In Pitch mode, the Sound Animation chart rises from silent to high pitch.

In this image the \emph{sound} varies from about 0.2 up to almost 1.0
(maximum \emph{sound}). Therefore the \emph{sound} will have a wide
Expand Down Expand Up @@ -179,8 +178,8 @@ \subsection{Testing the parameter}\label{testing-the-parameter}
I have paraVal ``offset y'' set at a constant value of 0.0, and I test
an addition factor of 3.0. The \emph{sound} will increase the soundVal
in the range of 0.0 to 3.0 maximum. However for the effect I want, I am
be using Negative influence mode, which will subtract the soundVal from
paraVal instead of adding it, therefore the possible range to be tested
using Negative influence mode, which will subtract the soundVal from
paraVal instead of adding it. Therefore the possible range to be tested
is 0.0 to -3.0.

The audio file I used only creates \emph{sound} between 0.0 and about
Expand All @@ -190,7 +189,7 @@ \subsection{Testing the parameter}\label{testing-the-parameter}
\emph{Note: There are two types of parameters in this program. The first
type can have negative values entered, the second type cannot. It is}
\emph{important} \emph{when animating a parameter of the second type,
that the functions and settings used, do not result in a negative
that the functions and settings used do not result in a negative
number.}

View the Sound Animation chart to see the what values you are likely to
Expand Down Expand Up @@ -242,11 +241,11 @@ \subsection{Rendering the animation.}\label{rendering-the-animation.}
\subsection{Now render the trial
animation.}\label{now-render-the-trial-animation.}

When rendering is finished (note the time it took) , press ``Show
When rendering is finished (note the time it took), press ``Show
animation'' button for a preview (you can also use ``Show animation''
while rendering is in progress.)

I also create a video with VirtualDub and the audio file, to ensure that
the animation is working correctly with the sound. If the animation is
satisfactory, then set the resolution and detail level to your final
settings and wait.
settings.

0 comments on commit e7318ae

Please sign in to comment.