Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - pld

Pages: [1] 2 3
1
preenfm2 and preenfm3 / Re: Formant Filter
« on: October 30, 2014, 02:00:58 PM »
Are 'double' calculations emulated in software, instead of using the hardware FPU? That would certainly kill performance...
However the comments seem to indicate that using float makes the filter unstable :-\



2
preenfm2 and preenfm3 / Re: Stm32F4Discovery port
« on: August 12, 2014, 08:06:17 PM »
Awesome, thanks for sharing. Definitely have to take a look at that...

3
preenfm2 and preenfm3 / Re: More Effects
« on: August 07, 2014, 12:33:42 PM »
Cool, my attempt at bitcrushing was a total failure ;)

Unfortunately I've been bogged down with work so I haven't had time, but I started implementing a delay to see what the performance impact is like (and as an excuse to practice ARM assembler). There's not too much RAM, but IIRC chorus/flanger type stuff doesn't need long delay times anyway.
Hopefully I can get back to that soon...

4
preenfm2 and preenfm3 / Re: Stm32F4Discovery port
« on: June 26, 2014, 02:32:15 PM »
Cool, I've been meaning to look into the DMA/i2s stuff myself :)

IIRC, the way things are calculated is
- the voice calculations produce float values (-1,1) and these are summed per timbre
- Timbre::fxAfterBlock scales the the timbre output from (-n,n) to (-131072,131072) via ratioTimbres and numberOfVoiceInverse to avoid clipping in the final mix
- during the final mixing of the timbre samples in buildNewSampleBlock, the sum is offset from float (-131072,131072) to int (0,2^18) for the DAC

So I guess you mainly have to replace the 131072.f (2^17) constants with 8388609.f (2^23).

Does the codec accept padded 24bit samples (i.e. 32bit), or how does that work with DMA?

5
preenfm2 and preenfm3 / Re: operator feedback
« on: June 24, 2014, 10:15:11 AM »
Is that DC filter similar to http://www.musicdsp.org/archive.php?classid=3#135
Looks like it, where x(n) = f4x, x(n-1) = f4xm1 etc.

Quote
also, unrelated, but what does "localv0L" and "localv0R" do?
The filters have to persist values between sample calculations as v0, v1, with l, r for stereo.
The values are stored as member variables of the Timbre class, and the 'local' versions are used as an optimization to keep them in a register (they get written back after the sample loop calculation).

6
preenfm2 and preenfm3 / Re: Patch Randomiser
« on: June 24, 2014, 10:01:06 AM »
I forget where it came up, but one complication for morphing is how to handle the mod matrix.
But an audio cross-fade should work with two instruments on the same midi channel :P

7
preenfm2 and preenfm3 / Re: operator feedback
« on: June 18, 2014, 11:08:09 AM »
awesome. thanks. That site was great. I found it a while back while looking to code a sample rate/bit rate reducer.
That reminds me, I started a decimator effect but apparently got distracted :)

Quote
Are there any other good sites or books to read about coding in C for music applications such as the PreenFM2?
Other than musicdsp, I think there's a bunch of stuff in the kvr-audio forums, but I've mostly been picking specific parts (oscillator, envelope) and googling my way through the softsynths and VSTs that pop up...

Quote
Are there any differences when coding for an ARM vs the ATMega?
You can get pretty far in C/C++ without worrying about the platform, but there are different pitfalls on each (e.g. memory access, FPU or not) if you have performance goals.
E.g. the ARM instructions only work on registers, not directly on memory, so often you have to force the compiler's hand by loading to a temporary variable, processing, and moving back.

Quote
How much ram do we have remaining in the PreenFM2?
I think the 64k CCM was pretty full, but I suspect there's still a good chunk of the 112k (?) RAM left. IIRC the code lives in flash.
There shouldn't be any run-time allocations, so there might be a map file or output from the linker that shows usage? Haven't checked...

8
preenfm2 and preenfm3 / Re: waveforms
« on: June 14, 2014, 08:49:44 AM »
Great!
I wouldn't have thought to use Excel to convert data :D

9
preenfm2 and preenfm3 / Re: waveforms
« on: June 12, 2014, 08:03:35 AM »
Same here.
overclocked, no waveforms in CCM. no filter. Algo 27 and 28. held down 2 keys.
I did not notice any glitches either.
Great. I'll try and get some better measurements at some point to see how close to the limit we are.

Quote
I started adding my own wave and got this when I compiled. Any ideas?
src/synth/Osc.cpp:108:1: error: too many initializers for 'WaveTable [8]'
You'll need to adjust #define NUMBER_OF_WAVETABLES in Common.h to 9.
Then add the type to enum OscShape in SynthState.h (before _LAST) and the name to the oscShapeNames list in SynthState.cpp:189 and you should be good to go.

10
preenfm2 and preenfm3 / Re: waveforms
« on: June 11, 2014, 09:04:08 PM »
So I just did a quick first test with no waveforms in CCM, algo 27 for each voice, HP filter, arp running and well, it doesn't sound pretty, but no obvious glitching (overclocked firmware).
But its too hot for me so I might have just re-flashed the same firmware twice ;)

11
preenfm2 and preenfm3 / Re: waveforms
« on: June 10, 2014, 11:10:28 AM »
do I need to format in 5 rows of equal size like you did?
As long as the array has 1024 elements, the formatting shouldn't matter. But it is more readable in case have to re-count :)
How did you come up with the values?

Quote
For my first attempt, I am going to load it into regular memory, and see what happens.
Will be interesting.
If I find some time, I'll compile a debug version and measure the impact in cycles (unless Xavier has already tried that?).

12
preenfm2 and preenfm3 / Re: waveforms
« on: June 10, 2014, 07:31:48 AM »
I've been using gcc-arm-none-eabi-4_7-2013q3 on OS X.
IIRC I did a 'brew install dfu-util' to be able to flash the board directly...

13
preenfm2 and preenfm3 / Re: Built!
« on: June 08, 2014, 04:11:19 PM »
Had a bit of fiddling finding the sweet spot on the volume- was getting a bit of distortion into the signal at max
I know the volume pot for the first kits is slightly wonky, but I thought the new revision was better. Xavier will know...

Quote
- polyphony is affected by the number of operators used? What is the maximum polyphony for each voice in each config? ie if I had a 6 op thing going on each instrument am I right in thinking the maximum is 48 ops, so 2 voices per channel?
Right, 48 operators total, so 48/6/4=2. If you use fewer instruments (number of voices = 0) you should be able to use more voices in the others.

Quote
- filters- I like what you have done there, but any chance of adding a bandpass? I do love me some bandpass...
Um, maybe :)

Quote
- mixing- how do I set the overall level of each instrument? (I'll RTFM and delete that one if I find an answer!)
Heh, there's a gain setting on the filter page :P As you might have noticed, the level is dependent on the number of voices too.

14
preenfm2 and preenfm3 / Re: waveforms
« on: June 08, 2014, 09:19:27 AM »
I guess space is an issue if you want to add a waveform, see http://ixox.fr/forum/index.php?topic=63386.0
Otherwise it's not too difficult as long as it's just another lookup-table (check src/synth/Osc.cpp and Osc.h, and SynthState.h and .cpp for the OscShape enum and editing).

If the waveform is generated a runtime somehow, then it becomes a bit more complex :)
The shruti oscillator is a bit different since it's integer based (and avr-optimized) instead of float, but the basic principles are the same (phase accumulator, lookup, interpolation).

15
Great!

Pages: [1] 2 3