Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Keoni29 on June 03, 2011, 07:09:30 am

Title: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 07:09:30 am
Is it possible to use your calculator as a synthesizer? I have experimented with this before. I made a litte programme that sends a squarewave with different frequencies corresponding to a certain presse d key.
If so:is it possible to link multiple calcs so that they can play multiple channels? (Don't worry about the cables. That's no problem for me :))
Simple tracker software can run on your calc, but I don't know if the calcs run it with exactly the same speed.
Title: Re: Use calc as a synthesizer
Post by: TIfanx1999 on June 03, 2011, 07:48:40 am
Well, The way you'd have to set it up (I would think) is one would have to be the master and the other calculators would have to be the slaves. Would you be handling linking with usb and audio out with the mini headphone? Also, I'm not sure how easy(or if its possible) to synchronize them in such a way. If I remember, it is actually possible to play multiple channels on a single calc, mobile tunes by Kerm Martin does this, but it is file play back only. I believe realsound by James Monteglo does this also, although I think his uses a wave. Finally, Thepenguin on these forums was experimenting with some audio playback similar to realsound. I hope this information was useful. :)

*edit* Don't double post if there is not a significant time between posts. Instead use the quick modify button to add additional thoughts. :)
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 08:10:14 am
Yeah, thats exactly what I had in mind. Exept for the usb thingy. I want to do something like this:
_______________________________________
        [recording device]
                |
   ______________
  |      |      |  
 [MAS]  [SLA]  [SLA]

_______________________________________
The master sends a package to the slaves. This contains the speed of the song and the length. When a slave recieves this package it plays its song. It won't be possible to stop the song via the master. Each slave has to be manually stopped. All data goes via the mini-jack cable. The music will also be transferred via this cable. You will hear a strange noise when the song starts I guess :P


I have some questions:
-How do I create other waveforms (triangle,sine,saw)?
-Can I adjust the volume of these waveforms?
-How can I play a note for x sec exact?

(I will merge those posts :) edit:no delete??? aint gonna happen <|)
Title: Re: Use calc as a synthesizer
Post by: TIfanx1999 on June 03, 2011, 08:42:19 am
1.) Not sure. No experience in this area.

2.) I'd hazard a guess to say that you won't have too much volume control. The calc doesn't have any sort of amp, and it's not really made for this sort of thing. It just has a state of info being sent to the port or not. And if you increase the volume on one channel it may drown out the others or sound too loud and distorted.
3.)I believe just sending a 1 to the port for a specified amount of time. I'm not sure how long would equal a second.

I think thepenguin77's thread had some good info. Let me see if I can find it and give you a link. Also, as I said, Thepenguin77 and Kerm Martin have some experience with play back at least. Quigibo does as well (he wrote Axe and it has some note playing functions.

*Edit* Link to thepenguin77's thread: http://ourl.ca/6456/104702

*Edit2*Some of Quigibo's threads that may have relevant information: http://ourl.ca/6263 and http://ourl.ca/6372
Title: Re: Use calc as a synthesizer
Post by: ZippyDee on June 03, 2011, 08:46:55 am
PULSE WIDTH MODULATION!!!!!!! :D
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 09:01:03 am
DEfenitely gonna try that :D
Title: Re: Use calc as a synthesizer
Post by: BrownyTCat on June 03, 2011, 09:01:32 am
This makes me wish I had a working 2.5mm converter.
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 09:14:33 am
I made one myself for pc connection. I have old nokia earphones too. Trusound works great :D
Title: Re: Use calc as a synthesizer
Post by: BrownyTCat on June 03, 2011, 09:15:47 am
I have old nokia earphones too

My mom threw those out. *FFFUUUUUU*
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 12:01:40 pm
I read a tutorial about interruptions. I'm working on a simple 1 channel tracker now.
Edit: I made a little test programme, but I think it's a mess.
Anyone know something about interruptions?
Title: Re: Use calc as a synthesizer
Post by: Ashbad on June 03, 2011, 01:58:52 pm
I read a tutorial about interruptions. I'm working on a simple 1 channel tracker now.
Edit: I made a little test programme, but I think it's a mess.
Anyone know something about interruptions?

Interrupts are basically "blocks" of code that are executed thousands of times per second (though it can vary in frequency by how you set up the interrupts).  Because they usually work like clockwork, it's useful putting things that need to remain entirely stable in speed throughout execution in an interrupt block.
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 02:00:26 pm
Sow freq ain't handy cuz it slows the game down. I gotta use send() in combination with interruptions?
Title: Re: Use calc as a synthesizer
Post by: Runer112 on June 03, 2011, 02:01:01 pm
Interrupts are basically "blocks" of code that are executed thousands of times per second (though it can vary in frequency by how you set up the interrupts).

*hundreds of times per second ;)
Title: Re: Use calc as a synthesizer
Post by: Ashbad on June 03, 2011, 02:01:47 pm
No, Send() has nothing to do with interrupts, unless it's part of your code block.  Slower interrupts usualyl don't slow down the main code, in fact slower interrupts usually amounts to faster normal code.

EDIT: runer, I guess I forget how archaic the 84+ really is at times :P
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 02:04:34 pm
Sow how do I play a note with interruptions?
Title: Re: Use calc as a synthesizer
Post by: Ashbad on June 03, 2011, 02:06:27 pm
you can put a Freq() command inside of an interrupt code block:

Code: [Select]
Lbl PLY
  Freq(100,200)
Return

FnInt(PLY,0)
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 03, 2011, 02:10:42 pm
I understand that, but the timing is such a hard thing :S
Title: Re: Use calc as a synthesizer
Post by: ztrumpet on June 03, 2011, 11:56:11 pm
This program (http://ourl.ca/11129) already exists, which shows Axe's synthesizer capabilities pretty well. :)  If you want to make it yourself, which would be pretty cool, there's still squidgetx's source, which is included in that download. :D
Good luck!
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 04, 2011, 03:11:33 am
I know that synth, but does it record?
Title: Re: Use calc as a synthesizer
Post by: Keoni29 on June 05, 2011, 06:26:49 am
I made a sfx editor which can be found here: http://ourl.ca/60685