Shop OBEX P1 Docs P2 Docs Learn Events
Designing an open-source synth and looking for the best architecture — Parallax Forums

Designing an open-source synth and looking for the best architecture

gluontronicgluontronic Posts: 6
edited 2011-03-01 09:59 in Propeller 1
hello,
all is almost in the title.

I'm currently designing an open-source synth and looking for the best architecture.
Before beginning to design the pcbs etc, I'd like to have a global view of all my project.

It will be an open source hardware DIY project ; but I probably sell the kits (already soldered pcb etc)

Some on avrfreaks advices me the AT32UC regarding the features I'd need!
But, naturally, I'm thinking about using directly arduino modules + shields ; I mean, arduino + some hardware peripherals.

Briefly, I can quote those features I need. There are "high level", I mean, I consciously don't evoke how I would make that.

- digital synthesis (basic DCO, DCF, LFO linkable to several parameters)
- (lofi) sample uploading to make a kind of wavetable synthesis
- midi in (on USB probably)
- little sequencer (where I could save around 16 patterns into a memory and dump/restore it on a computer)
- some potentiometers
- some leds
- some buttons (switches)
- possible save/restore of some presets on a computer (through max/msp software which basically can talk ... any protocols I'd need)

I'm interested by any informations about the first right choices which will drive my next days.
After that, I coul begin to code stuff and prototype things.

Arduino was my first target because I know it and I know the community around it too.
But themselves, they told me to explore parallax 8x32 instead of arduino.
So I'd need information about the feasabilities of my project with this platform.
what is the language required to program it?
Does it exist a kind of RTOS?
etc.

all the best,
gluontronic

Comments

  • siljamickesiljamicke Posts: 66
    edited 2011-02-23 03:09
    For starters, check out what Ale did with SIDcog. It uses just one of eight processors in a propeller to fully emulate a SID-chip. That leaves you seven processors and 32 i/o-pins for the rest. Assembler on the prop is fun, Spin is easy to learn, and the OBEX here is stuffed with everything you'll need, be it midi, vga/tv-out, general serial communication, etc. etc.
    Look no further, if you ask me!
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-02-23 05:55
    open-source synth and looking for the best architecture. Before beginning to design the pcbs etc, I'd like to have a global view of all my project.
    ... Does it exist a kind of RTOS?

    Hi gluontronic

    nglordi posted his analog computer simulation in post
    http://forums.parallax.com/showthread.php?128055-Propforth4.0a-available-for-download&p=978370&viewfull=1#post978370

    My first thought was to use this to implement an EMS VCS3 synthesizer (which I had my hands on many years ago but could not buy)
    http://en.wikipedia.org/wiki/EMS_VCS_3

    The code is in forth, so it is a very interactive realtime operating system, and is mostly as fast as assembler, and the parts that are not can (fairly) easily be optimized in assembler (without having to do the whole thing in PASM). If one were to start with the LowResVGA or HighResVGA examples, one could develop on the prop directly without the need of a PC. (Afterthe initial loading of the spin files into prop EEPROM, though the PC would be handy for disk/storage services until we get SD working properly).

    I would be interested in colaborating if this is an option you want to persue.
  • gluontronicgluontronic Posts: 6
    edited 2011-02-23 08:17
    hello all.
    I have to firstly thank you a lot for your answers.

    It seems so POWERFUL !
    I guess, indeed, I could stop here and choose this framework.
    I'm a bit afraid by forth. I can code C quite naturally.

    I cannot figure out it works.
    Does it exist a kind of OS? bootloader?
    Do we have to code all? or only application part, using libraries ?

    Indeed, 8 cores seem poweful.

    Does it exist a module integrating the parallax 8x32 that I could use with a kind of shield I'd make by myself for all the other components (buffers, DAC, analog filters, potentiometers, leds etc) ??
    The modular way would be nice to me, not because I cannot solder, but because of my point of view about this project.


    (btw, I made this big midi controller, if you are interested: http://designthemedia.com/protodeck

    all the best,
    gluontronic
  • potatoheadpotatohead Posts: 10,261
    edited 2011-02-23 08:51
    Well, I think I would learn to solder. It's not that hard, and there are some kits that are cheap. Check out http://www.gadgetgangster.com, and others that will be posted up here. There are shields, but you should know that Propellers are fairly easy to build with. A few basic parts gets you video, audio, and interface I/O, reducing the need to use shields.

    Plus, if you can solder a little, you can put your finished synth into a enclosure, or mount everything on a larger board so it can last, or be used.

    If you can code in C, SPIN is no problem. PASM is not that difficult either, and it's powerful.

    In general, Propeller library code, can be combined fairly easily, no RTOS needed, because the 8 cores are concurrent multi-processors. This literally means you can grab the Sid object, for example, get it working, then write your own code that works with it, operating almost as if that Sid is a real Sid! OBC made a music player that shows the piano keys lighting up while the Sid tunes are playing, for example. No RTOS, just the Sid, the tracker, and his visual interface.

    IMHO, being able to mash different things together like that, without having to deal with a OS kernel, or scheduling, is one of the real strengths of the prop. Worth a look.

    If I were you, I would snag a coupla inexpensive kits, and a bread board, and really do some learning. It's a lot of fun. Getting setup to solder basic stuff isn't a lot, and it will pay off multiple times in your life.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-23 08:54
    There is a nice (and free) C compiler available (here).

    The Propeller has a masked ROM (see the datasheet) that contains a bootloader as well as an interpreter for one of its programming languages, Spin (the other is it's native assembly code). This bootloader loads from either a serial port (normally a PC ... for debugging) or a standard 32K byte or larger I2C EEPROM. There are programs available that can be placed in this EEPROM and used to boot the actual program from an SD card or larger flash memory.

    There are a variety of existing boards that can be used with plug-in "shields" including one (here) that is compatible with the Arduino shield layout and has been used with several Arduino shields.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-02-23 09:15
    I'm a bit afraid by forth. I can code C quite naturally.

    I cannot figure out it works.
    Does it exist a kind of OS? bootloader?

    Forth is like an "interactive assembler" and saves you from having to master the particular assmebler for your micro first before you can get started. It is an OS and coding environment and language. It is a nice tool to have, but it is not mandatory; some of us just like it. You download a spin file from the google code site and load it like any spin program. If you want more help, please PM me and I will take you through it.

    If you are already comfortable in C, there are many experts here that can help you with that route. One of the biggest advantages of the prop is the community. Even if you choose C, the techniques and results you get can help with similar work in the other environments.
  • gluontronicgluontronic Posts: 6
    edited 2011-02-23 14:47
    potatohead wrote: »
    Well, I think I would learn to solder. It's not that hard, and there are some kits that are cheap. Check out http://www.gadgetgangster.com, and others that will be posted up here. There are shields, but you should know that Propellers are fairly easy to build with. A few basic parts gets you video, audio, and interface I/O, reducing the need to use shields.

    Plus, if you can solder a little, you can put your finished synth into a enclosure, or mount everything on a larger board so it can last, or be used.

    If you can code in C, SPIN is no problem. PASM is not that difficult either, and it's powerful.

    In general, Propeller library code, can be combined fairly easily, no RTOS needed, because the 8 cores are concurrent multi-processors. This literally means you can grab the Sid object, for example, get it working, then write your own code that works with it, operating almost as if that Sid is a real Sid! OBC made a music player that shows the piano keys lighting up while the Sid tunes are playing, for example. No RTOS, just the Sid, the tracker, and his visual interface.

    IMHO, being able to mash different things together like that, without having to deal with a OS kernel, or scheduling, is one of the real strengths of the prop. Worth a look.

    If I were you, I would snag a coupla inexpensive kits, and a bread board, and really do some learning. It's a lot of fun. Getting setup to solder basic stuff isn't a lot, and it will pay off multiple times in your life.

    ok I can figure out that.
    solder isn't a problem, protodeck required a lot of solder more more than the number I'd need in this project :)

    Mike Green wrote: »
    There is a nice (and free) C compiler available (here).

    The Propeller has a masked ROM (see the datasheet) that contains a bootloader as well as an interpreter for one of its programming languages, Spin (the other is it's native assembly code). This bootloader loads from either a serial port (normally a PC ... for debugging) or a standard 32K byte or larger I2C EEPROM. There are programs available that can be placed in this EEPROM and used to boot the actual program from an SD card or larger flash memory.

    There are a variety of existing boards that can be used with plug-in "shields" including one (here) that is compatible with the Arduino shield layout and has been used with several Arduino shields.

    Ok, I'll check/read all the programming languages available.
    I really begin to be reallt interested to go further :)

    Forth is like an "interactive assembler" and saves you from having to master the particular assmebler for your micro first before you can get started. It is an OS and coding environment and language. It is a nice tool to have, but it is not mandatory; some of us just like it. You download a spin file from the google code site and load it like any spin program. If you want more help, please PM me and I will take you through it.

    If you are already comfortable in C, there are many experts here that can help you with that route. One of the biggest advantages of the prop is the community. Even if you choose C, the techniques and results you get can help with similar work in the other environments.

    Ok, I have to check spin in particular.
    But C would be the finest way for me.



    @all: thanks a lot for your precise answers!
    I feel this framework very powerful & flexible too.
    I just have to figure out how to manage midi, pots, switches & leds with it (reading your links will help for sure!)

    I'll make my own pcb for buttons, leds & pots, connectors.
    I'd like to have the brain from one side, this specific pcb on another side.
    what would be the best 8x32 board module ?

    I targeted this one:
    http://www.parallax.com/Store/Microcontrollers/PropellerDevelopmentBoards/tabid/514/CategoryID/73/List/0/SortField/0/Level/a/ProductID/711/Default.aspx

    32208-M.jpg
    250 x 250 - 30K
  • gluontronicgluontronic Posts: 6
    edited 2011-02-23 15:13
    OMG : http://www.gadgetgangster.com/tutorials/373
    indeed, it seems very simple.

    still a bit afraid about library/spin/forth...
    but if I can figure out the learning curve isn't too hard (especially about the time & my planning around this particular project), I'll go with it!
  • gluontronicgluontronic Posts: 6
    edited 2011-02-24 02:06
    still thinking ...

    could I make different modules in my code? I guess yes.
    Imagine that: one module is the DCO, another one the DCF, and another one the DCA (for nice ADSR envelopes). I code another one for delay line fx. each one working on one different cogs.

    does it sound crazy? impossible ? really possible ?

    last question, if I run with 8x32, should I buy other DACs? buffer ? or does the basic board already contains that?
    if the 2 answers are yes, I'll buy it and learn forth, spin or more :p
  • siljamickesiljamicke Posts: 66
    edited 2011-02-24 13:13
    Nice to see that you start to like our beloved prop!
    What you suggest about doing it in modules is exactly what the prop is all about! And when you get around to start programming the prop, you'll probably realize, that it might be able to do more than you initially thought... Start to play with assembler, that'll be the key to your success I think.
    A resistor and blocking cap is all you'll need initially for dac. Use the counters, each cog has two of them, and pwm a pin for analog output.
    If you want to go further you'll find that analog input at audio frequencies are doable as well. A midi object is readily available in the OBEX... You basically just paint the enclosure, everything else is here ;)
  • AribaAriba Posts: 2,690
    edited 2011-02-24 14:29
    gluontronic

    you don't say what kind of synthesizer you will do. There are so much possible variations:
    - monophon or polyphon (how many voices)
    - pure digital or hybrid digital/analog
    - sound synthesis: subtractive, FM, wavetable, additive, PD....

    The Propeller misses a hardware multiplier, thats why he is not the best solution for digital synthesis. But that it is possible shows SID-Cog or my MIDI synthesizer here:
    http://forums.parallax.com/showthread.php?111867

    Spin is too slow for such projects, you need to code in Assembly, or perhaps PropBasic, which can also be fast enough.

    Andy
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-02-27 14:45
    Ariba wrote: »
    you don't say what kind of synthesizer you will do:
    - monophon or polyphon (how many voices)
    - pure digital or hybrid digital/analog
    - sound synthesis: subtractive, FM, wavetable, additive, PD....

    If you are interested in simulating an analog synthesizer, nglordi posted his code for filters "used to solve simulation models consisting of differential equations. It could also be used to simulate filters which might be used to processs audio data"

    http://forums.parallax.com/showthread.php?128055-Propforth4.0a-available-for-download&p=978370&viewfull=1#post978370

    This code is in forth, so it is fairly simple once you get used to the "stack" idea, and runs nearly as fast as assembler without having to get bogged down in the particulars of assembler right off the bat. Also, the currect version of propforth supports adding additional props, so you are not limited to 8 cogs and 32 I/O pins, and its fairly transparent to the user.
  • Ahle2Ahle2 Posts: 1,179
    edited 2011-02-28 10:16
    A 1 pass multimode resonance filter (any combination of lp+bp+hp) could have been made in 12 pasm instructions if it wasn't for the fact that the propeller hasn't got a hardware multiplier.
    In SIDcog the multiplication is handled with a call to a subroutine called multiply. If you count this subroutine call as a pseudo-instruction the filter part of SIDcog takes 14 instructions.
    If you are satisfied with just a lp filter without resonance you could probably do it in like 6 instruction (including the pseudo instruction)
    Doing this with propforth will not even come close to be as optimized.
  • prof_brainoprof_braino Posts: 4,313
    edited 2011-03-01 09:59
    Ahle2 wrote: »
    A 1 pass multimode resonance filter (any combination of lp+bp+hp) could have been made in 12 pasm instructions if it wasn't for the fact that the propeller hasn't got a hardware multiplier.
    In SIDcog the multiplication is handled with a call to a subroutine called multiply. If you count this subroutine call as a pseudo-instruction the filter part of SIDcog takes 14 instructions.
    If you are satisfied with just a lp filter without resonance you could probably do it in like 6 instruction (including the pseudo instruction)
    Doing this with propforth will not even come close to be as optimized.

    As with everything else, optimization is done in assembler. If you want to get up and running and to the point where you have something to optimize, propforth is one route that one may use, if one decides to have this tool in the toolbox. Some folks don't like too many tools in the tool box and prefer a swiss army knife, this is fine. Forth is my favorite screwdriver, and it serves its purpose well when its appropriate.

    Professor Lordi has done more work on the analog computer port of hs FPC code to propforth, posted on the other thread .
Sign In or Register to comment.