Post Reply 
( Free42 ) Random Melody
05-31-2020, 07:33 AM
Post: #1
( Free42 ) Random Melody
This program run the "Random Tone" between
Tone 1 to 6 in an infinite loop to produce
"Random Melody"

Demo Clip: https://youtu.be/PxY_8OMilUQ

Program:

LBL "T"
RAN 6 x 1 + IP
1 - X=0
GTO 00 //(1)
1 - X= 0
GTO 01 //(2)
1 - X=0
GTO 02 //(3)
1 - X=0
GTO 03 //(4)
1 - X=0
GTO 04 //(5)
1 - X=0
GTO "T"
TONE 6 //(6)
GTO "RANT"
LBL 00 TONE 1 GTO "T"
LBL 01 TONE 2 GTO "T"
LBL 02 TONE 3 GTO "T"
LBL 03 TONE 4 GTO "T"
LBL 04 TONE 5 GTO "T"

Gamo 5/31/2020
Find all posts by this user
Quote this message in a reply
05-31-2020, 07:54 AM
Post: #2
RE: ( Free42 ) Random Melody
Why not use TONE IND ST X?
Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
05-31-2020, 09:07 AM (This post was last modified: 05-31-2020 11:17 AM by Gamo.)
Post: #3
RE: ( Free42 ) Random Melody
Thanks for the review Werner
This is my first try on HP-42S programming and
That is very nice idea about the Indirect Stack manipulation.

Gamo
Find all posts by this user
Quote this message in a reply
05-31-2020, 02:01 PM
Post: #4
RE: ( Free42 ) Random Melody
Very nice musical program. I like how stretched a few tones into a medley.
Visit this user's website Find all posts by this user
Quote this message in a reply
05-31-2020, 05:23 PM (This post was last modified: 06-02-2020 04:30 AM by Gamo.)
Post: #5
RE: ( Free42 ) Random Melody
Thanks Eddie and Werner for the review.
As Werner mentioned about TONE IND ST X

Here is the program updates.

LBL "TT"
RAN 9 x 1 + IP
TONE IND ST X
GTO "TT"

Much shorter program and this time used all
9 Tones, test it and sound melody is not as good
to hear compared to only 6 Tones version.

Gamo
Find all posts by this user
Quote this message in a reply
06-03-2020, 09:49 AM
Post: #6
RE: ( Free42 ) Random Melody
(05-31-2020 05:23 PM)Gamo Wrote:  Thanks Eddie and Werner for the review.
As Werner mentioned about TONE IND ST X

Here is the program updates.

LBL "TT"
RAN 9 x 1 + IP
TONE IND ST X
GTO "TT"

Much shorter program and this time used all
9 Tones, test it and sound melody is not as good
to hear compared to only 6 Tones version.

Gamo

You don't really need the IP. Also, there are 10 tones from 0 to 9, so you can do:

LBL "TT"
RAN
10
x
TONE IND ST X
GTO "TT"

to play a random melody with the 10 different tones.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
06-03-2020, 10:03 AM (This post was last modified: 06-03-2020 10:04 AM by Gamo.)
Post: #7
RE: ( Free42 ) Random Melody
ijabbott, Thanks for the updates and thats right no need of the

[1 + IP] I was thinking about that Random Dice routine and just

put it in eventhough this have nothing to do with Random Tones.

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)