Play sound with different pitches

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
buchacho
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 50
Joined: Fri Jun 14, 2013 10:22 pm

Play sound with different pitches

Post by buchacho » Wed Mar 18, 2015 9:54 pm

I remember in HyperCard you could do something like "play boing" with other parameters to change pitch and note duration. Is there any equivalent way of doing this in LiveCode? So far I have a stack that can play sounds in a folder I specify, but I would like to also play the sounds at different pitches and duration like I could in HyperCard.

asayd
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Mon Apr 10, 2006 7:02 pm
Location: Provo, Utah, USA
Contact:

Re: Play sound with different pitches

Post by asayd » Thu Mar 19, 2015 4:07 pm

Sadly, that's one feature that didn't make the jump from HyperCard to LiveCode. Years ago there was a 3rd party project called something like ShakoBox that attempted to emulate that behavior using MIDI (I think), but I don't know what ever became of it.

It may be that it will become possible to implement such a feature as a widget in LC 8 by tapping into some OS call, but that'll be a job for someone smarter than me. :)

Devin
Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9663
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Play sound with different pitches

Post by dunbarx » Thu Mar 19, 2015 5:22 pm

Along the lines that Devin is talking about, I miss the old HC "dial" command, which generated DTMF tones directly, and if you held your phone handset up to the computer speakers, it would call a number. I used this feature with external gadgets to dial numbers through the speaker output port, so I did not have to actually hold the handset that way.

I guess this can be done with widgets as well...

Craig Newman

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Play sound with different pitches

Post by Mark » Thu Mar 19, 2015 6:19 pm

Hi,

i did that too. The sounds were not generated, however, They were stored as snd resources and they could play immediately because they were already loaded into memory.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

buchacho
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 50
Joined: Fri Jun 14, 2013 10:22 pm

Re: Play sound with different pitches

Post by buchacho » Thu Mar 19, 2015 7:18 pm

That's too bad!! I know a lot of old stacks use this feature, including tone dial, so that would affect conversions to LiveCode. Can this please be added as a feature request?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4002
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: Play sound with different pitches

Post by bn » Thu Mar 19, 2015 7:26 pm

Hi buchacho,

check out Thierry Douez's sunnYmidi

http://sunny-tdz.com

He has several versions on his site. Works as an external for Mac.

Kind regards
Bernd

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Play sound with different pitches

Post by jacque » Fri Mar 20, 2015 5:45 pm

The dial tones are easy. Export them from HC or see if you can find them on the net somewhere. After that it's just a matter of a short script that plays the sounds in response to field text. That's how HC did it too.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Play sound with different pitches

Post by Mark » Fri Mar 20, 2015 7:43 pm

When I exported the snd resources and converted them to wav, the phone system didn't recognise them anymore. I suspect it had something to do with a delay or a small distortion caused by LiveCode. It could still be worth trying on the modern, much faster computers of today, since I did this with a 350Mhz iMac at the time.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Play sound with different pitches

Post by jacque » Sat Mar 21, 2015 2:01 am

I haven't tried these, but they're available: https://evolution.voxeo.com/library/aud ... /index.jsp
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Play sound with different pitches

Post by erikhans08 » Thu Mar 26, 2015 4:31 pm

How about a simple drumbeat that you could use like a metronome with an animation. This is for dancers following an animation to learn their positions.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”