MIDIbox FM preview II

Well, one month has passed after the last update, here is the current status:

D2k has created a PCB layout for the MBHP_OPL3 module which is perfectly working:

Not visible: the 3 SMD chips at the bottom (one YMF262, two YAC512).

The second YAC512 is optional for two additional audio channels.

The firmware is ca. 75% completed: the synth architecture is defined, all implemented features are working (hopefully ;-)) without failures, the first two JSynthLib editor panels are running.

The Patch Editor:

Full view: http://www.ucapps.de/midibox_fm/mbfm_patch_panel_pre1.gif

The Drum Editor:

Full view: http://www.ucapps.de/midibox_fm/mbfm_drum_panel_pre2.gif

Missing: the ensemble editor which allows to edit the MIDI channel assignments/keyboard ranges/transpose/audio channels, etc… for the 4 instruments

Some new demo samples (no perfect work yet ;-)):

A .mid file (Phil Collins, Against all Odds…) played with a Rhodes-like sound. This was to test the polyphony (6 4OP voices are automatically assigned, the longest note will be killed first):

http://www.midibox.org/midibox_fm/mbfm_demo3.mp3

Some sound engine tests - note that beside of the hardware EGs, each voice has two additional LFOs and one EG. Each modulation target has an own depth pot, and it’s also possible that a LFO or EG modulates the frequency of another LFO (so really wired things ;-)):

http://www.midibox.org/midibox_fm/mbfm_demo4.mp3

The third example demonstrates the possibilities of the drum synth, which has it’s own voices (it runs in parallel to the main synth engine):

http://www.midibox.org/midibox_fm/mbfm_demo5.mp3

Next targets: finalize all planned features, adding the third editor panel for an ensemble, completing the minimal control surface, starting with the full control surface, case, and having a lot of fun :slight_smile:

Best Regards, Thorsten.

Wow, cool demos!! (But I could not download demo5.mp4?..)

A YMF262 is already desoldered an waiting for it’s rebirth!

Btw. what are the other 3 chipt on the PCB???

Raphael

Fixed - the other three chips are TL074 (a common operation amplifier)

Best Regards, Thorsten.

great!

i’m just curious about two things:

how did you solder mount these SMD IC on the backside? could you post a photo? i’m curious because the pins are SOOOO tiny and close one to each other!! :slight_smile:

manomanomanoman…

it has a drumsynth!?!  :D  (still can’t open demo5_mp3, but hey, i’ll build it anyway)

can’t wait to start on this one! TK, thanks for staying active and sharing your creations!

cheers, marcel

TK - a typo fixed, the file still isn’t there ;D

..Sounds, VERY interesting!!!

One thing: Software Envelope.. that could be (switchable to) multistage EG… (well, WT is there, but.. ;))

(And for “live” sound editing - is there a way to prevent these TOO drastic changes in sound.. I mean, for real live work, It’s nice to change textures, but with FM it’s SO easy to end up with something totally unwanted. CS live mode? (Custom disabling of some the controls/ scaling of the others, to some wanted range??))

Bye, Moebius

Of course, You’re never runnin’ out of ideas.. BUT - I’ve never heard of a real HARDWARE synth, capable of Granular synthesis.. *Whistling*

Alright, the link to the drum example should work now: http://www.midibox.org/midibox_fm/mbfm_demo5.mp3 - if you get a “service temporarily unavailable” message, then try it again after some minutes. It seems that the server is currently very busy.

Matteo: I’ve added some photos to the http://www.ucapps.de/mbhp_opl3.html page.

Marcel: yes, but a very FM-like drum synth (see example): punchy bass drum and a lot of noise :wink: Unfortunately the frequencies for the Toms and snare/hihat/cymbal is not independent from each other, also the envelopes are very rough. But this doesn’t prevents you from creating some nice grooves :slight_smile:

Moebius: I will check the request for a multistage EG once I know how much parameters are free after the planned features are implemented.

Live editing: I’ve already an alternate view for the most important parameters in mind, maybe I can extend this idea by a set of full assignable parameter pages, where the parameter number and adjustable range can be specified. :slight_smile:

Granular synthesis: hold the line until I will start with FPGAs (just kidding - or not? :wink:

Best Regards, Thorsten.

Wow, TK, that is IMPRESSIVE!  I hadn’t realized that each YAC512 provided a pair of outputs.  Now I’m going to have to get a new mixer, and it’s all your fault  ;D

All I’ve managed to do this past month is change apartments.  My electronics gear is somewhere in a pile of boxes that takes up half of the den  :-/  As of the moment I haven’t made any more progress on my POKEY or PSG synths, nor will I before 2005.  But oh well, that’s life.

Anyways, I’m looking forward to having a Midibox FM PCB available from SmashTV sometime next year (as he no doubt will have them, once you have finalized your hardware).

:-X :-X :-X

*astouned*

:-X :-X :-X

WOW! Very cool sound! Perfectly fitting with the SID.  ;D

Man, I have to overthink my mixer routing… again … making place for one more slot…  ;)

this looks great to me so far (i still haven’t built my first box yet.. more and more features keep coming to me :wink: ..

this seems like the kind of synth i would like to build a control surface for.. well.. that led mod matrix on the sid looks very hard to build..  i think with this one i would like kind of a “halfway” option between minimal control surface and the full one..

what i mean is the full surface without the led matrix (mods controlled via the menu like in the minimal version)..  only if an led matrix is planned of course..

the new modulation possibilities sound good as well..

on the proteus synths they use a system of virtual patchcords for mod sources controlling other sources (lfos controlling lfos etc.).. this is all done via a 2 line lcd (so it seems a bit like rocket science.. much easier with a computer  ;-)

for example:

env1 <- patchcord1-> LFO2rate <- patchcord2->  Q

each patchcord can control several parameters at once and each has a “depth” control (if this is set to -100 then the lfo waverform it controls is reversed)

as well as patchcords the emu synths also have “processers” such as diode, quantizer, 4x gain etc. which can be patched between mod sources to modify the control signals further.. and further and further..

all the best

adam

Hi Adam,

problem with the OPL3 is, that there are not so much parameters which are worth to modulate with a high-resolution LFO/EG. Most of them are 4 bit only. Therefore my strategy is to have a modulation link to all high-resolution parameters, and these are the four “volumes” (note: volume on a modulator->carrier connection means that the amount of FM), the note pitch, the LFO frequency, the assigned AOUT (analog CV output) - and thats all.

There are already 14 modulation targets (each has a seperate depth parameter into negative/positive direction), with 6 voices this makes 84 modulation targets which are handled in parallel. I think this is enough for the small PIC :wink:

The diode, gain, etc… features could be selected with the waveform parameter, so here I’m open in the future

Anyhow, all parameters can be modulated with the wavetable sequencer. Thats the strategy for more complex sounds, and therefore the possibilities are hard to compare with common synths.

Best Regards, Thorsten.

hi Thorsten,

thanks for writing… the wavetables sound promising..i have been playing with wavetables in pure data lately, in pd it is possible to draw the waveforms with the mouse (and to draw way outside of the graph for some extreme gains etc.).

i am not very familiar with yamaha fm.. my friend dave has had a dx7 for years.. he told me once about using noise as a starting point for analogue style synthesis.. i’m not sure what he meant but i have been trying it lately on the micro modular.. first thing i found was that modulating an operator all the way with white noise makes musically pitched noise (which i like..)

i am still an absolute beginner with fm.. i was amazed to find that this makes a very nice soft cymbal type sound.. i think what amazed me was that i modulated an operator with a 7hz sine wave, and got white noise, i couldn’t believe it.. i was pleased.. i was expecting a pulsing ring modulated type sound.. but no :wink: well.. the lfo rate is also controlled by the ad envelope so it might be going much higher than 7hz at the peak..

the emu (again) also features noise as a  modulation source.. and another LFO shape called sine plus noise (it looks like a very messy sine wave) which is supposed to be good for simulating flute and trumpet vibrato

i think a noise LFO waveform would consist of a random value at each step, evenly spaced across the whole range

another nice feature i have heard of on some synths is the ability to morph the lfo shape with a knob.. i think it would be nice to be able to choose 2 lfos (e.g square and sine) and morph between the two shapes.. i don’t know how difficult this is to program.. anyway..

bye for now

best wishes

adam

PS, for  anyone who is interested, here are some articles on modulation, am and FM

modulation

http://www.soundonsound.com/sos/feb00/articles/synthsecrets.htm?session=bd3fadb4fe25022fcb636f0b5aae42f7

am

http://www.soundonsound.com/sos/mar00/articles/synthsecrets.htm?session=bd3fadb4fe25022fcb636f0b5aae42f7

fm part 1

http://www.soundonsound.com/sos/apr00/articles/synthsecrets.htm?session=bd3fadb4fe25022fcb636f0b5aae42f7

fm part 2

http://www.soundonsound.com/sos/may00/articles/synth.htm?session=bd3fadb4fe25022fcb636f0b5aae42f7

To get a handle on what might be possible with this chip its best to consult the datasheet:

'>http://www.funet.fi/pub/msx/mirrors/msx2.com/vortexion/YMF262.PDF

Naturally modulation can be done in software, but only within the limits of the resolution of the parameter, and also at a rate that the PIC can update all parameters.

This is more in the mS rather than uS so that software envelopes and LFO’s are possible but useful audio frequency modulation in software most likely not.

cheers

TK, on a related note, I’m wondering what the approximate max software envelopes would be for the PIC.  It’s sort of a digitally-controlled analog synth project that’s sitting in the back of my mind (and would be somewhat related to the AOUT/SHX8).

Would it be possible to have 8 modulation sources (envelopes, LFOs, let’s say they’re 8-bit each) and 12 modulation destinations (pitch, filter Q, etc.) for each of 8 voices?  Or would this run out of steam at about 4 voices?  

Mostly I’m trying to determine whether I should be using a MIOS frontend interface with a dedicated envelope-controlling PIC (using the PIC’s PSP feature), or whether a MIOS unit could handle a control surface, MIDI in, _and_ a whole lot of envelopes.

I’m just looking for a vague estimate of whether or not this would be possible - I doubt that I’ll get around to this for quite some time, as I still have about 3 other projects to do first :slight_smile:

Hi Andrew,

Would it be possible to have 8 modulation sources (envelopes, LFOs, let’s say they’re 8-bit each) and 12 modulation destinations (pitch, filter Q, etc.) for each of 8 voices?  Or would this run out of steam at about 4 voices?  

I’m missing an important spec, and thats the update cycle for all voices.

I guess that this number of modulation sources/destinations can be processed within ca. 500 uS with 16 bit resolution. A lower resolution is not practicable, since especially EGs require a high-res counter, otherwise slow ramps cannot be realized

Calculation example: let’s say the waveform generator is clocked at each millisecond, the EG counter is working with 16-bit resolution, this means that ramps with up to 65s are possible. With 8-bit resolution the maximum ramp time is only 256 mS

For LFOs a high-res counter is also required, with 8-bit you would only get a minimum frequency of 4 Hz (depends on implementation), with 16-bit ca. 0.015 Hz

1 mS update cycle means that 1mS-500 uS = 500 uS are free for other tasks: for updating the analog outputs, handling MIDI, printing LCD messages, etc…

Best Regards, Thorsten.

Addendum: I just remember that for such a dedicated application you can “unroll” your code, means: avoid iteration loops and avoid the use of pointers and indirect addressing, but generate the code directly (e.g. with macros). Registers should always be addressed diretcly. This enlarges the code dramaticaly, but can reduce the execution time by factor 3..5 and more :slight_smile:

I’m missing an important spec, and thats the update cycle for all voices.

Ooh, good point.  I hadn’t really considered that, but I would imagine that a tolerance of 2-4 mS would probably be acceptable.  Maybe up to 10 mS, but I’d really have to listen to the effects of timing.

I guess that this number of modulation sources/destinations can be processed within ca. 500 uS with 16 bit resolution. A lower resolution is not practicable, since especially EGs require a high-res counter, otherwise slow ramps cannot be realized.

While I had taken the bit resolution into account for the DAC portion (I think 8-bit should be “good enough” for envelopes), I hadn’t considered the EG timing.

Calculation example: let’s say the waveform generator is clocked at each millisecond, the EG counter is working with 16-bit resolution, this means that ramps with up to 65s are possible. With 8-bit resolution the maximum ramp time is only 256 mS.

What about this alternate possibility:  each envelope has a phase accumulator, step size, and output value.  Each cycle (1 mS), the phase accumulator for each envelope is increased by one;  if it overflows, the step size is added to the output value.  The fastest envelope would be 1 mS; the base accumulator value would be 255 (to overflow on the first step), and the step size would also be 255.  The longest envelope would be 65s as you said; base accumulator value would be 0, and the step size would be 1.

Or I could be way off - my approach above is just a bastardized 16-bit envelope that makes precise envelope timing difficult at best, and may be almost as (if not more) processor-intensive as a full 16-bit envelope.

This is all getting _way_ ahead of myself (I still need to determine whether my PIC-based 2 osc + 2 subosc numerically controlled wavetable oscillator scheme will work)… but it’s a lot more fun than doing what I’m supposed to be getting paid to do at work  ;)

While I had taken the bit resolution into account for the DAC portion (I think 8-bit should be “good enough” for envelopes), I hadn’t considered the EG timing.

The final resolution for the destinations doesn’t really matter here. You have to work with 16 (or better 24) bit anyhow once you add the LFO/EG output values, thereafter you have to saturate the result to the desired resolution to avoid distortions.

What about this alternate possibility:  each envelope has a phase accumulator, step size, and output value.  Each cycle (1 mS), the phase accumulator for each envelope is increased by one;  if it overflows, the step size is added to the output value.  The fastest envelope would be 1 mS; the base accumulator value would be 255 (to overflow on the first step), and the step size would also be 255.  The longest envelope would be 65s as you said; base accumulator value would be 0, and the step size would be 1.

thats the way how I’ve realized the envelopes and LFOs in the MIDIbox SID/MIDIbox FM firmware (see sid_lfo_table.inc and sid_env_table.inc)

but it’s a lot more fun than doing what I’m supposed to be getting paid to do at work  ;)

It definitely is a nice challenge, especially because you are able to hear the results - and sometimes really wired things are coming out, sounds which won’t be doable with the final (bugfixed) algorithm :wink:

Best Regards, Thorsten.

thats the way how I’ve realized the envelopes and LFOs in the MIDIbox SID/MIDIbox FM firmware (see sid_lfo_table.inc and sid_env_table.inc)

Cool, so I’m not crazy after all  :D

In case you’re curious, the project concept is a digitally-controlled analog polysynth with 8 voices (and up to 8 parts multitimbral).  Each voice has two numerically-controlled wavetable oscillators + two suboscillators (-1 or -2 octaves), a Wasp-style 12 dB VCF (switchable NP/LP/BP/HP) with distortion and dual VCAs (one for post-filter, one for post-distortion).  The wavetable oscillators will be in a dedicated PIC18F252 (one per voice), using modified Digisound and/or Wiard wavetables in a lookup table in the PIC to save on chip count.

Of course, this has nothing to do with the Midibox FM…

Hi Andrew,

you must publish sound samples and pictures of the project once the first sounds are comming out! :slight_smile:

Best Regards, Thorsten.

Well done !

     Another neat project idea :slight_smile: ..Had forgotten til now how much i liked the sound of those pc soundcard midichips. Demo’s sounding very promising, be great to see more on this.

     By the way, i read somewhere that although this chip supports panning; its support is somewhat limited, ie hard left, center, or right - can i make a suggestion that the 4 output channels have their (panning) output modulated by a add on CV section ? ..this would add the scope for far more dynamic sound variations - (ADSR or LFO modulated?) as part of the sound patch itself potentially.

     Also btw, yamaha have been continuing development of such soundchips; there latest offering both plays back pcm & adpcm (audiostreams (& samples ?)) & does fm synthsis with 64 voices ! ..interesting - but opl 3 seems more adiquate & accessable right now :slight_smile: ..might end up salvaging this in the future tho :wink:

{see: http://www.yamaha.co.jp/english/product/lsi/prod/pdf/sgl/4mf781a20.pdf}