Jump to content
IGNORED

MUSIC command in IntyBASIC


dotyj

Recommended Posts

Hi all:

 

I got bored and bought an Intellivision earlier this month.  I also downloaded and installed the IntyBASIC SDK and I think it's wonderful.

 

I'm not new to the Intellivision, I had a Tandyvision back in 1984, but traded it for a Vic-20 in 1986.

 

I bought the "Programming Games for Intellivision" had bound book and it arrived on Tuesday and I've been going through the tutorials.

 

I'm not new to BASIC programming, I've been programming in BASIC since 1978.  So thankfully I don't have a huge learning curve going on.

 

But, I think I'm missing something with the MUSIC command.

 

I understand the DATA statement and the general syntax.  I wsorked out that S is sustain.  I also see that the letters represent notes and that the # sign is sharp.

 

But I'm confused on the numbering system after notes, say C4,-,-.  What's the 4 for?  Is it to represent octives?  If so, which number would represent middle C?

I'm assuming that if I were to type something like MUSIC C4,E4,G4 I'd produce the C chord.

 

I'm not well versed in music theory so excuse any ignorance with how chords work.

 

Also, I don't understand how to choose instruments?  Or is that even a thing.

 

Thanks in advance to anyone who can explain this to me, and I ask forgiveness if this has been asked many times in the past.  I tried searching for this subject but didn't find anything.

Link to comment
Share on other sites

MUSIC works like this.

 

First is the note: C. Next, the scale: 4. Next, the instrument:

 

W = Piano

X = Clarinet

Y = Pan flute

Z = Bass (use only with octave 4 and above)

 

The S statement is for sustain note.

 

The 4th channel is for drums. M1, M2, M3 is allowed. (I don't remember the name of the drums on english, but make some experiments)

 

music_1:


    DATA 3
    MUSIC C4W,D4W,E4W,-
    MUSIC S,S,S,-


    MUSIC C4X,D4X,E4X,-
    MUSIC S,S,S,-


    MUSIC C4Y,D4Y,E4Y,-
    MUSIC S,S,S,-


    MUSIC C4Z,D4Z,E4Z,-
    MUSIC S,S,S,-


    MUSIC -,-,-,M1
    MUSIC -,-,-,M2
    MUSIC -,-,-,M3

 

Hope this helps.

Edited by Nyuundere
Forgot the bass
  • Like 1
Link to comment
Share on other sites

You're right. C4 is middle C and your chord is right.

 

To use instruments just add W, X, Y or Z letters after your note, for example C4X. The instrument setting will persist until the next instrument change in the same channel.

 

The example shown by @Nyuundere misses a MUSIC STOP or MUSIC REPEAT at the end.

 

Link to comment
Share on other sites

1 hour ago, Mik's Arcade said:

so, to be clear, the C4 (middle C) is the pitch notation, right?

 

thanks.....this is VERY helpful

 

Yes, "C4" is the pitch notation.

 

In general, you can think of the IntyBASIC music player notation as a stream of notes organized in a table, like a spreadsheet, where the columns represent the available channels, and each row is a new note event -- i.e., the note to play, or silence.  You can visualize it like this:

'        Channel A     Channel B     Channel C
MUSIC  <note-event>, <note-event>, <note-event>
MUSIC  <note-event>, <note-event>, <note-event>
MUSIC  <note-event>, <note-event>, <note-event>
MUSIC  <note-event>, <note-event>, <note-event>
MUSIC  END

 

Where each <note-event>  is described similarly to American Standard Pitch Notation (ASPN), in the following format:

<note><octave><instrument>
  
  <note>        The letter of the note, like "A" or "C#"
  <octave>      The octave in which to play the note, a number from 2 (low) to 6 (high).
  <instrument>  Optional instrument to use:  W=Piano, X=Clarinet, Y=Flute, Z=Bass.

 

Note that the instrument is optional, and if you don't include it, the note will play using the last instrument assigned for that channel.  The default instrument is always "W" for piano.

 

The note and octave, on the other hand, are required for each note.

 

For instance, Middle C, which in ASPN is represented typically as "C4", is noted in IntyBASIC as "C4".  The main difference is the addition of the optional instrument.

 

     -dZ.

 

  • Like 1
Link to comment
Share on other sites

30 minutes ago, Mik's Arcade said:

I'm going to have to start playing with this. It seems like it won't be that hard to translate sheet music into Intybasic  :)

It really is not hard at all.  It's a bit more technical, but still relatable.

Link to comment
Share on other sites

18 hours ago, Mik's Arcade said:

@Carlsson donated this awesome music to me for my new game.  I will take a crack at some other music. I was just being silly moving the cursor around (poorly) to the beat....haha

 

That is great for a title screen!  I can't wait to see some game-play.

Link to comment
Share on other sites

34 minutes ago, DZ-Jay said:

 

That is great for a title screen!  I can't wait to see some game-play.

 

I'm hoping not to disappoint.  I still have a lot of work cut out for me, I'll be sure to create some new topics soon when I get stumped. Hopefully between Oscar's 2 books I can piece everything together and make a decent game.

 

I need to finish up the character select screen before the real work begins, but now I am more than motivated because I put this out there. I have to deliver now!!!

 

I think I will work out the 10k loop and make a video....don't want to spoil the ideas I have for the longer (aka, higher difficulty) runs. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...