Saving sounds

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jessamy99
Posts: 103
Joined: Thu Oct 25, 2012 3:23 pm

Saving sounds

Post by jessamy99 » Mon Dec 08, 2014 11:18 pm

Hi everyone,

I need help with sounds.
You are always so good at solving my problems!

I want to have different notes in individual buttons.
I want the user to be able to move them around into any order.
Then save and play the melody.

Can you help?

I have searched and can't find what I need.

Thanking you all in advance!
Best wishes,
Jessamy

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Saving sounds

Post by endernafi » Mon Dec 08, 2014 11:44 pm

Hi Jessamy,

I'm attaching an old stack which I've made some time ago.
It's a drum-playing app.
Well, not an *app* per se, since it's far from being completed 8)

I've coded it for a musician friend of mine who wanted to learn LiveCode.
So, just the basics.

I know that it's not exactly what you want but hey, it's a start :wink:

Fiddle with it by changing the mp3 files within the content folder: *app folder*/theContent/soundAssets
That's, of course, if you want to use pre-recorded files.
But, to produce sounds on-the-fly, midi or something; it's a very different story.

Like I said, it's a start.
Play with it, then head back here so we can help you more.

P.S.: Sounds included are heavily cropped and then encoded in 64kbps to fit the forums' file size limits.


Best,

~ Ender
Attachments
drumTest.zip
(68.88 KiB) Downloaded 270 times
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

jessamy99
Posts: 103
Joined: Thu Oct 25, 2012 3:23 pm

Re: Saving sounds

Post by jessamy99 » Tue Dec 09, 2014 12:33 am

Dear Ender,

You are an angel!
I will look at it tomorrow!

(Currently on my back with sciatica - it is particularly bad this evening!)

I will get back to you when I have played with it.

All the best,
Jessamy

jessamy99
Posts: 103
Joined: Thu Oct 25, 2012 3:23 pm

Re: Saving sounds

Post by jessamy99 » Wed Dec 10, 2014 10:19 pm

Dear Ender,

I like the drum app, and the fact two or more sounds can play at once!

I think I have an idea how to do mine!

I have made a box to push the buttons into, in a row.
Then the names of the buttons can be saved in a text array.
(As they go into the box...)
Then, if you call up that array...
Hopefully the names of the buttons/sounds will be able to play consecutively!

I will get back to you if I need more help!

It is good to see you though!
Thankyou for all the help, it is really appreciated!

All the best!
Jessamy

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Saving sounds

Post by endernafi » Fri Dec 12, 2014 11:17 pm

Hi there Jessamy,


Your idea was interesting and I had some spare time.
So, I wanted to play a little with Livecode after a long time.
Here it is:
playerJessamy.zip
(187.91 KiB) Downloaded 319 times
There is still much work to do, of course.
But I assume, this one is more suitable to your needs than the *drum* stack.
That was horrible, I know :D


To-Do :
  • Change play order of notes by drag&drop
  • Snap & align the notes if moved
  • Set the layer of the grabbed note to top
  • Remove individual notes
  • Play multiple notes at the same time (harmony / chords)
  • Change duration of individual notes by resizing the graphics representing them
    {Resize code is already there, just commented-out}
  • Give an option to pick different instruments and/or techniques
  • Eye-candy : Actual note symbols as icons?
  • Eye-candy : Music sheet background for canvas & auto-align to bars/lines?

Hope it helps with your project...


Cheers,

~ Ender
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

jessamy99
Posts: 103
Joined: Thu Oct 25, 2012 3:23 pm

Re: Saving sounds

Post by jessamy99 » Sat Dec 13, 2014 7:07 pm

Dear Ender,

Thankyou so much for the trouble you have gone to!

It is much appreciated!

Four lines of code are worth four pages of explanations!!

I will look at it now. :)

Wishing you and all the team a very Merry Xmas and a brill 2015!!

Best wishes,
Jessamy

Post Reply