Shop OBEX P1 Docs P2 Docs Learn Events
hydra as a musical instrument — Parallax Forums

hydra as a musical instrument

coherent.noisecoherent.noise Posts: 2
edited 2007-07-07 00:22 in Propeller 1
just brainstorming for now....

i'm considering buying a hydra not so much to make games, but to use as a custom live chiptune style musical instrument. unfortunately, it only has monaural audio output. but the hydra is so incredibly well equipped otherwise. i saw a previous thread with a little bit about this. maybe once i get things hashed out with the hydra, i could see how many spare cogs i can get and use them in a custom design with several audio output channels.

so, i guess i'm asking if there's anyone out there pursuing something similar. i've seen a lot of work that looks interesting, like the HDMF (if i recall the acronym correctly). if i'm the first one to go down this path, i guess that's cool, too (if a little daunting).

if i decide to take the plunge after a little more research, i'm sure you'll see a lot more of me.

~andrew

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-02 19:30
    Another option is to buy a Demo Board with the built-in stereo output and built-in monaural microphone. You won't get the game controllers or the expansion port and you should still buy the Hydra manual and CD since most of the programs that don't use the game controllers are trivially ported to other Propeller boards like the Demo Board.
  • epmoyerepmoyer Posts: 314
    edited 2007-07-02 21:27
    It's also not that hard to hack a second audio out channel onto the Hydra (just an cap, a resistor, and a jack), so you can pick and choose. One thing that's nice about the Hydra is that it has an expansion slot and comes with a blank prototyping board which fits in that slot. You could easily and one or more audio outputs to the prototyping board and then you could plug it in when you needed it, and remove it to do other projects when you didn't. That's what I'm doing today for several different hardware projects.
  • mparkmpark Posts: 1,305
    edited 2007-07-02 23:35
    Andrew, making a musical instrument was also what got me interested in the Propeller. I was kind of bummed to discover there's no hardware multiply, but I went ahead and got a Hydra and am enjoying pulling my hair out trying to figure out video. Haven't even touched sound yet.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-03 00:12
    mpark,
    There may not be a multiply instruction, but for small multipliers, it's very easy to do the multiplication with only a few instructions given the "barrel shifter" that shifts any number of bits in one instruction. If the multiplier changes, but not too often (like a coefficient), you can even do a sort of compiler to construct the instruction sequence to do the multiplication.
  • epmoyerepmoyer Posts: 314
    edited 2007-07-03 00:18
    Hmmm. I can't believe I hadn't noticed the absence of a multiply instruction in assembly. Does anyone know what spin does under the hood? Does it use the log tables? Is there some inaccuracy one needs to be mindful of as a result?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-03 00:55
    epmoyer,
    There are some nice, short, reasonably fast assembly routines for unsigned integer multiplication, division, and square root that Chip wrote and posted in a document called "Propeller Guts". Signed variations of these are nice "exercises for the reader" type things.

    The Propeller version 2 will have a 16x16 multiply instruction that can easily be used to do a 32 x 32 multiply.
  • ClemensClemens Posts: 236
    edited 2007-07-03 12:46
    Hi Andrew, there's a midi-in object in the object exchange that could be used to add a midi keyboard.
    I also think it would be better to start off with a demoboard/protoboard or a propstick-usb (which is what i have wink.gif) and use the propeller ports for midi-in/through/out, headphones digital audio out... or some fancy ir-input devices like the roland "D Beam controller".
    Actually I was "dreaming" about building a device with the propeller like these little yamaha pocket sequencers/expanders (QY-70 etc.) that they have discontinued.
    http://www.yamahasynth.com/products/qy100/index.html
    But I realize that's a little ambitious for someone who's only just starting with programming!

    Maybe I will try something more simple like controlling the speech synthesis example from the propeller-library via midi and keyboard.
    It would be nice to be able to type text on the keyboard and have the propeller sing the words in the pitch of the notes you press on the midi keyboard.
  • AndreLAndreL Posts: 1,004
    edited 2007-07-04 16:55
    Use the free expansion board with the hydra, then make two audio channels with a cap and resistor for each, put a stereo out put cable attached to the experiment board, done. Two channels, and you can use the same code from all the audio drivers people have been making.

    Andre'
  • coherent.noisecoherent.noise Posts: 2
    edited 2007-07-06 17:44
    Sorry I took so long to reply!

    I had a hunch but didn't really know if the prototyping board would allow me some audio expansion. I would ultimately probably like to have something like a synthesizer per cog, and then connect the outputs to a desktop mixer. Anyway, so I see it's relatively easy. Good.

    As for hardware multiply, I had thought about that myself, too. But when I was reading the Propeller data sheet I saw that it has log and sine tables (I suppose to partly make up for the lack of hardware capability?). I thought it could at least be "fun" to go back to school, as it were, and try to come up with clever ways of making sound with those tables.

    I'm glad there is a midi object. My dream is not so much a pocket sequencer (or tracker) -- just because I'd be too lazy to mess with more customized I/O. Rather, I'm looking to make things more along the lines of Cynthcart, Synthcart, NanoLoop, MIDINES, and Prophet64 but customized just for me.

    Anyway, I don't suppose you all needed to know that. Thanks for the tips anyway. I'm really planning on saving up to get one now. (I might, just might, use it for games, too!)
  • TonyATonyA Posts: 226
    edited 2007-07-06 20:05
    Hi,

    I'm working on the same thing, also inspired by the those things you mentioned. I was actually on my way to learning ASM just to mess around with the Atari 2600, NES. Then by chance came across the Hydra. It's a great way to learn this stuff.

    (I'm coming from a "circuit bending", self taught background, so the programming is all new for me.)
  • epmoyerepmoyer Posts: 314
    edited 2007-07-07 00:22
    By the way Mike, thanks for pointing me to the "Propeller Guts" doc. There are some good tidbits in there and I hadn't read it before.
Sign In or Register to comment.