Welcome, Guest. Please login or register.


Author Topic: how to put a musicbox tune into program code? (Read 10333 times)

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
how to put a musicbox tune into program code?
« on: 2015.March.27. 15:11:42 »
How can I put a musicbox-made tune into my assembler program?

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: how to put a musicbox tune into program code?
« Reply #1 on: 2015.March.27. 15:41:20 »
Use the COMPILE function then specify the address (XXXX) what you want.
Entry points:
XXXX+0: The A register select the music. Disable IRQ when call this.
XXXX+3: Player IRQ, call it at every 1/50 seconds.
XXXX+6: stop music.

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: how to put a musicbox tune into program code?
« Reply #2 on: 2015.March.27. 16:04:10 »
Thank you, it worked:)

It turned out to be a veeery stupid question because after compiling it even shows you what to do.

Although I had in mind making a ready .tun file to work with my code without the need of loading in it musicbox for recompilation, but I guess that doesn't even make sense because of different start addresses...:oops:

EDIT:

So for sound effects I have to make a couple of small "tunes" and use xxxx+0 to choose between them, right?

But if I wanted to have music always playing and share one channel of music with sound effects?
Would I need two musicbox players code? with the effects' one having priority over the music player?
« Last Edit: 2015.March.27. 16:08:37 by ssr86 »

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: how to put a musicbox tune into program code?
« Reply #3 on: 2015.March.27. 16:37:31 »
And if I wanted to make my own tune, how can I make new and edit patterns? How do I choose and edit instruments?...

I read the hungarian instructions but the google translator wasn't able to do a good job...
So I thought that maybe someone has some experience in working with the tool and could help me...

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: how to put a musicbox tune into program code?
« Reply #4 on: 2015.March.28. 13:36:08 »
Probably Szipucsu can help you. I'm totally stupid at music :oops:
« Last Edit: 2015.March.28. 13:39:04 by szipucsu »

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: how to put a musicbox tune into program code?
« Reply #5 on: 2015.March.28. 13:38:14 »
I read the hungarian instructions
Where did you read the Hungarian instructions? I don't remember them. Can you link or copy them? I can try to translate them into English.
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: how to put a musicbox tune into program code?
« Reply #7 on: 2015.March.28. 14:54:15 »
Where did you read the Hungarian instructions? I don't remember them. Can you link or copy them? I can try to translate them into English.

right there: :D
http://ep128.hu/Ep_Util/Music_Box.htm

Thank you, a translation should be very helpful

EDIT:
I somehow managed to figure out how to display the pattern editor, but haven't yet found a way to edit instruments...
« Last Edit: 2015.March.28. 15:16:18 by ssr86 »

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: how to put a musicbox tune into program code?
« Reply #8 on: 2015.March.28. 16:02:00 »
http://ep128.hu/Ep_Util/Music_Box.htm
Oh, oh, why isn't it there in the music section?

Many years ago I used this program a little, however I found its usage somewhat difficult. (Rather after FL Studio :D )
I try to help you and look at the program again.
There are patterns, you can name them the way you want. One pattern contains some notes, you can edit them. In the middle of the screen there are three big windows, you can see the name of the patterns in them. You have to put patterns after one another, this will be the song. That's what I can remember. Does it help? However, I don't remember how to create a pattern and how to edit its content (notes), I will look at it now in the emulator.
« Last Edit: 2015.March.28. 16:13:26 by szipucsu »
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: how to put a musicbox tune into program code?
« Reply #9 on: 2015.March.28. 17:08:04 »
That's all what I've found out:
First go to one of the three patterns windows and type a name for the pattern (e.g. "first").
Go to the most right side of the line where you typed the pattern, press space, and an arrow will appear (in the attached picture it's "1")
Select "Set" ("2" in the picture) so you will be able to edit the content of the pattern you set with the arrow.
In the 3rd step you have to type in the name, length and envelope of a note but I don't really understand how... :roll:

[ Guests cannot view attachments ]
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: how to put a musicbox tune into program code?
« Reply #10 on: 2015.March.28. 17:24:41 »
But first of all you have to define an envelope.
I attach another file, a demo of the very first steps of creating a song.
However, I don't understand why I cannot hear anything when I select "Play" option at the end...
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: how to put a musicbox tune into program code?
« Reply #11 on: 2015.March.28. 18:55:39 »
Thank you, that was helpful.

« Last Edit: 2015.March.28. 19:30:40 by ssr86 »

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9898
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: how to put a musicbox tune into program code?
« Reply #12 on: 2015.March.28. 19:43:05 »
Thank you, that was helpful.
You are welcome!

However, I don't understand why I cannot hear anything when I select "Play" option at the end...
Does anybody know it?
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: how to put a musicbox tune into program code?
« Reply #13 on: 2015.March.28. 22:19:29 »
Does anybody know it?
I tried playing around with the "skala.tun" and it goes mute when I touch the envelope number and press set... although I set the same value again...
Maybe it's related...

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
Re: how to put a musicbox tune into program code?
« Reply #14 on: 2015.March.29. 06:24:54 »
I tried playing around with the "skala.tun" and it goes mute when I touch the envelope number and press set... although I set the same value again...
Maybe it's related...
I played a bit with the snapshot, and I do not know the Musicbox, but it was strange for me, I could not set amplitude value.