Jump to content

Photo

a million reasons and a question or two....


20 replies to this topic

#1 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • 782 posts
  • Location:Charlton, MA

Posted Sat Dec 30, 2017 8:49 PM

Hello all,

over the past week I have been trying to use some of the music and sound fx tools for the TI.

 

I have not had any luck at all.  With Windows 10, I get errors trying to run every tool I tried.

 

I put a sample song segment together,  I want to make this or other music play in the background of an actual game.

 

Any help / step by step... would be great!   I guess I don't have the patience to figure these things out anymore?

 

I want to use complied XB and the XB256 sound tables.

 

Thanks in advance!

 

Sample:

50 FOR X=1 TO 2
100 FOR C=1 TO 11
110 CALL SOUND(240,262,0)
120 CALL SOUND(10,262,30)
130 NEXT C
140 CALL SOUND(740,330,0)
150 CALL SOUND(10,262,30)
160 FOR C=1 TO 11
170 CALL SOUND(240,262,0)
180 CALL SOUND(10,262,30)
190 NEXT C
200 CALL SOUND(740,330,0)
210 CALL SOUND(10,262,30)
220 FOR C=1 TO 6
230 CALL SOUND(240,262,0)
240 CALL SOUND(10,262,30)
250 NEXT C
260 CALL SOUND(240,220,0)
270 CALL SOUND(10,262,30)
280 CALL SOUND(240,196,0)
290 CALL SOUND(250,262,30)
300 FOR C=1 TO 5
310 CALL SOUND(240,262,0)
320 CALL SOUND(10,262,30)
330 NEXT C
340 CALL SOUND(240,220,0)
350 CALL SOUND(10,262,30)
360 CALL SOUND(240,196,0)
370 CALL SOUND(10,262,30)
380 FOR C=1 TO 6
390 CALL SOUND(240,262,0)
400 CALL SOUND(10,262,30)
410 NEXT C
420 CALL SOUND(240,220,0)
430 CALL SOUND(10,262,30)
440 CALL SOUND(240,196,0)
450 CALL SOUND(250,262,30)
460 FOR C=1 TO 5
470 CALL SOUND(240,262,0)
480 CALL SOUND(10,262,30)
490 NEXT C
500 CALL SOUND(240,220,0)
510 CALL SOUND(10,262,30)
520 CALL SOUND(240,196,0)
530 CALL SOUND(10,262,30)
540 NEXT X
595 FOR X=1 TO 2
600 CALL SOUND(740,440,0)
610 CALL SOUND(10,262,30)
620 CALL SOUND(240,392,0)
630 CALL SOUND(10,262,30)
640 CALL SOUND(740,330,0)
650 CALL SOUND(10,262,30)
660 CALL SOUND(240,392,0)
670 CALL SOUND(10,262,30)
680 CALL SOUND(495,330,0)
690 CALL SOUND(10,262,30)
700 FOR C=1 TO 5
710 CALL SOUND(240,330,0)
720 CALL SOUND(10,262,30)
730 NEXT C
740 CALL SOUND(240,392,0)
750 CALL SOUND(10,262,30)
760 CALL SOUND(240,262,0)
770 CALL SOUND(10,262,30)
780 CALL SOUND(240,262,0)
790 CALL SOUND(10,262,30)
800 REM CALL SOUND(240,294,0)
810 REM CALL SOUND(10,262,30)
820 CALL SOUND(240,330,0)
830 CALL SOUND(250,262,30)
840 NEXT X
850 CALL SOUND(240,440,0)
860 CALL SOUND(10,262,30)
870 CALL SOUND(240,330,0)
880 CALL SOUND(10,262,30)
890 CALL SOUND(240,440,0)
900 CALL SOUND(10,262,30)
910 CALL SOUND(240,330,0)
920 CALL SOUND(10,262,30)
930 CALL SOUND(240,440,0)
940 CALL SOUND(10,262,30)
950 CALL SOUND(240,330,0)
960 CALL SOUND(10,262,30)
970 CALL SOUND(240,294,0)
980 CALL SOUND(10,262,30)
990 CALL SOUND(240,330,0)
1000 CALL SOUND(10,262,30)
1010 CALL SOUND(170,330,0)
1020 CALL SOUND(10,262,30)
1030 CALL SOUND(170,330,0)
1040 CALL SOUND(10,262,30)
1050 CALL SOUND(240,523,0)
1060 CALL SOUND(10,262,30)
1070 CALL SOUND(240,494,0)
1080 CALL SOUND(10,262,30)
1090 CALL SOUND(740,494,0,294,0)
1100 CALL SOUND(120,262,30)
1110 CALL SOUND(170,262,0)
1120 CALL SOUND(10,262,30)
1130 FOR C=1 TO 4
1140 CALL SOUND(170,294,0)
1150 CALL SOUND(10,262,30)
1160 NEXT C
1170 CALL SOUND(240,294,0)
1180 CALL SOUND(10,262,30)
1190 CALL SOUND(240,330,0)
1200 CALL SOUND(10,262,30)
1210 CALL SOUND(240,392,0)
1220 CALL SOUND(10,262,30)
1230 CALL SOUND(170,330,0)
1240 CALL SOUND(10,262,30)
1250 CALL SOUND(240,262,0)
1260 CALL SOUND(10,262,30)
1270 CALL SOUND(2240,262,0)
1280 CALL SOUND(10,262,30)
 

Attached Files



#2 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Sat Dec 30, 2017 9:07 PM

I am running windows 10 and I use the CLASSIC99 emulator.

 

I pasted your code into it and it ran perfectly.

 

You might want to define some variables for 1/4 notes, 1/2 notes and whole notes to make the timing of your music sound better.

(Music and recording engineering background here)

 

Example:

 50 TEMPO=100
100 QTR=1*TEMPO
110 HALF=2*TEMPO
120 DOTHALF=3*TEMPO
130 WHOLE=4*TEMPO
140 EIGHTH=.5*TEMPO

with these you replace the duration value with the name of the note and it will all be musically related to the tempo.

Change the tempo variable to make it go faster or slower.

 

B


Edited by TheBF, Sat Dec 30, 2017 10:08 PM.


#3 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 782 posts
  • Location:Charlton, MA

Posted Sun Dec 31, 2017 1:53 PM

Hi BF.

Yes, I normally try to use read and data statements for music / fx.

However, with so much of this song repeating notes, looping seems a better choice.

 

I agree with vars for duration.  It would make this easier to tweak the timing for certain.



#4 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 4,336 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sun Dec 31, 2017 2:03 PM

Is it significantly slower to use variables versus literals in a CALL SOUND?



#5 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 782 posts
  • Location:Charlton, MA

Posted Sun Dec 31, 2017 3:27 PM

Not that I have ever noticed?  But I am certain someone here can provide actual cycle counts!

 

I am hoping to start using music from the sound list player and have it is a background process.

 

I guess I am just not that smart?

 

I hope to put 2 new games I started on here today.  A lunar lander type game and a Q*Bert type game.

They are on my other laptop, so I need to just stop goofing around on this one and get back to programming.

This new laptop gives me tons of issues with creating object files etc.  It is just easier to use the old one.

 

Happy New Year!



#6 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,240 posts

Posted Sun Dec 31, 2017 11:04 PM

Not that I have ever noticed?  But I am certain someone here can provide actual cycle counts!

 

I am hoping to start using music from the sound list player and have it is a background process.

 

I guess I am just not that smart?

 

I hope to put 2 new games I started on here today.  A lunar lander type game and a Q*Bert type game.

They are on my other laptop, so I need to just stop goofing around on this one and get back to programming.

This new laptop gives me tons of issues with creating object files etc.  It is just easier to use the old one.

 

Happy New Year!

 

I'm not sure about XB256, but you can only imperatively send sound data in BASIC and Extended BASIC.

 

Having music as a background process could only be achieved in 100% assembly or by writing an assembly routine to feed the sound chip independently.



#7 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 4,336 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sun Dec 31, 2017 11:10 PM

I am hoping to start using music from the sound list player and have it is a background process.

 

I guess I am just not that smart?

 

matthew180 posted an Extended BASIC sound player, and there is a way to use character definitions with the console ISR to play native sound lists.



#8 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 4,067 posts
  • Location:Denmark

Posted Mon Jan 1, 2018 9:09 AM

Having music as a background process could only be achieved in 100% assembly or by writing an assembly routine to feed the sound chip independently.

 

You can set up a soundlist in VRAM and have the built-in ISR (Interrupt Service Routine) play it in the background. Can be done from almost any TI programming language without any Assembly.


Edited by sometimes99er, Wed Jan 3, 2018 4:44 PM.


#9 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • 1,006 posts
  • Location:Lansing, NY, USA

Posted Mon Jan 1, 2018 4:22 PM

 

I'm not sure about XB256, but you can only imperatively send sound data in BASIC and Extended BASIC.

 

Having music as a background process could only be achieved in 100% assembly or by writing an assembly routine to feed the sound chip independently.

You can use sound lists in XB256.  You can play two different sound lists at the same time; for example, you might want music playing constantly and then explosions or other sounds on top of the music.  

There are two different sound list compilers that take XB CALL SOUND statements and convert them to sound lists.



#10 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,240 posts

Posted Mon Jan 1, 2018 5:57 PM

You can use sound lists in XB256.  You can play two different sound lists at the same time; for example, you might want music playing constantly and then explosions or other sounds on top of the music.  

There are two different sound list compilers that take XB CALL SOUND statements and convert them to sound lists.

 

I figured it would have that. :) Baseline Extended BASIC does not have the ability to do sound lists independently though.



#11 senior_falcon OFFLINE  

senior_falcon

    Stargunner

  • 1,006 posts
  • Location:Lansing, NY, USA

Posted Mon Jan 1, 2018 8:42 PM

Hello all,

over the past week I have been trying to use some of the music and sound fx tools for the TI.

 

I have not had any luck at all.  With Windows 10, I get errors trying to run every tool I tried.

 

I put a sample song segment together,  I want to make this or other music play in the background of an actual game.

 

Any help / step by step... would be great!   I guess I don't have the patience to figure these things out anymore?

 

I want to use complied XB and the XB256 sound tables.

 

Thanks in advance!

 

Sample:

50 FOR X=1 TO 2
100 FOR C=1 TO 11
110 CALL SOUND(240,262,0)
120 CALL SOUND(10,262,30)
130 NEXT C
 

Read the section in the XB256 manual that pertains to sound lists.  Pages 12 to 17.  It is a little complex; start with the sample program, get it to work, and then try compiling your own program.  At a quick glance, there are only two things wrong.  FOR/NEXT loops can loop no more than 9 times, and you should put one more line, 1290 STOP or END to tell the sound list player to turn off.  SLCOMPILER is the one you want to use.



#12 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Mon Jan 1, 2018 8:51 PM

Hi BF.

Yes, I normally try to use read and data statements for music / fx.

However, with so much of this song repeating notes, looping seems a better choice.

 

I agree with vars for duration.  It would make this easier to tweak the timing for certain.

 

In case I didn't get to my own point, I was trying to get to the basis of western music timing versus  computer delay timing. 

 

In conventional Western Music note durations are in relation to  the number of counts per measure. (typically 4 or 3 for simple music)

 

Note durations are relative to 1 beat in the measure and all others are either multiplied by 2 or divided by 2.

That's all there is.

 

The exceptions are notes that have 1/2 of their own value added to them:  a 2 beat note + 50% more=3 beats. A 1/2 beat note+50%=.75 of a beat.

 

  When you break these rules your music sounds wrong.  

 

The reason I am saying this is I hear musical timing weirdness in your code.

 

If you already know this I apologize for boring you.

 

I am playing with your code to see if I can give you an example of what I am talking about.

 

BF



#13 1980gamer OFFLINE  

1980gamer

    Dragonstomper

  • Topic Starter
  • 782 posts
  • Location:Charlton, MA

Posted Tue Jan 2, 2018 4:37 PM

Thank you Senior_Falcon for the manual pages.   I remembered it was possible, but could not remember were I read about it.

 

BF,  I don't know much about musical notes..  My wife took a few minutes to tell me what each note was.

 

I assumed that a measure was 1 second no matter how many notes were within it.  So 4 notes,  each is a 1/4 of a second, 8 would be an 1/8 of a second.

 

This is why none of my previous efforts had any real music or sound fx.  For my pacman knock-off, I used trial and error to make it sound right.

 

I would like to do something neat and original for my next few games.  But, I would settle for borrowing from others ;)

 

 



#14 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Wed Jan 3, 2018 11:09 AM

BF,  I don't know much about musical notes..  My wife took a few minutes to tell me what each note was.

 

I assumed that a measure was 1 second no matter how many notes were within it.  So 4 notes,  each is a 1/4 of a second, 8 would be an 1/8 of a second.

 

This is why none of my previous efforts had any real music or sound fx.  For my pacman knock-off, I used trial and error to make it sound right.

 

I would like to do something neat and original for my next few games.  But, I would settle for borrowing from others ;)

 

So here is an example of what I mean.  

 

If we say a measure is one second, and there are 4 beats per measure (a common number for western music) then each note is 250 mS long.

Each of these notes is called a "quarter" note for obvious reasons in this case.  All other note durations should be a multiple of the quarter note, typically a multiple of 2.

 

Setting the quarter note to 250mS sets the "tempo" (means time in Italian) of the song. We would call it the speed of the song perhaps.

 

The extra little complexity that you picked up on is that a note must end before the next note plays or is runs together.

(sometimes running together is what you want, but not always)

 

So we want the note to come on for a period of time and turn off for a time and both of these times added together must = 250mS.

 

So I created  note on-times and note off-times of 90% and 10% in this example.

 

I did not clean up the fact that your composition seems to not always have 4 beats to measure and details like that.

I will leave that up to you as the composer.


10 TEMPO=250
22 REM duty cycle of notes are 
24 REM 90% on, 10% off

40 DOTHALF=3*TEMPO*.9
42 DOTHOFF=3*TEMPO*.1

50 WHOLE=4*TEMPO*.9
52 WHOLEOFF=4*TEMPO*.1

60 EIGHT=.5*TEMPO*.9
62 EOFF=.5*TEMPO*.1

70 QTR=1*TEMPO*.9
72 QTROFF=1*TEMPO*.1

80 HALF=2*TEMPO*.9
82 HOFF=2*TEMPO*.1

100 FOR X=1 TO 2
110 FOR C=1 TO 11
120 CALL SOUND(QTR,262,0)
130 CALL SOUND(QTROFF,262,30)
140 NEXT C

150 CALL SOUND(HALF,330,0)
160 CALL SOUND(HOFF,262,30)

170 FOR C=1 TO 11
180 CALL SOUND(QTR,262,0)
190 CALL SOUND(QTROFF,262,30)
200 NEXT C

210 CALL SOUND(HALF,330,0)
220 CALL SOUND(HOFF,262,30)

230 FOR C=1 TO 6
240 CALL SOUND(QTR,262,0)
250 CALL SOUND(QTROFF,262,30)
260 NEXT C
270 CALL SOUND(QTR,220,0)
280 CALL SOUND(QTROFF,262,30)
290 CALL SOUND(QTR,196,0)
300 CALL SOUND(QTROFF,196,30)

310 FOR C=1 TO 5
320 CALL SOUND(QTR,262,0)
330 CALL SOUND(QTROFF,262,30)
340 NEXT C
350 CALL SOUND(QTR,220,0)
360 CALL SOUND(QTROFF,262,30)
370 CALL SOUND(QTR,196,0)
380 CALL SOUND(QTROFF,262,30)
390 FOR C=1 TO 6
400 CALL SOUND(QTR,262,0)
410 CALL SOUND(QTROFF,262,30)
420 NEXT C
430 CALL SOUND(QTR,220,0)
440 CALL SOUND(QTROFF,262,30)
450 CALL SOUND(QTR,196,0)
460 CALL SOUND(QTROFF,262,30)

470 FOR C=1 TO 5
480 CALL SOUND(QTR,262,0)
490 CALL SOUND(QTROFF,262,30)
500 NEXT C
510 CALL SOUND(QTR,220,0)
520 CALL SOUND(QTROFF,262,30)
530 CALL SOUND(QTR,196,0)
540 CALL SOUND(QTROFF,262,30)
550 NEXT X

560 FOR X=1 TO 2
570 CALL SOUND(HALF,440,0)
580 CALL SOUND(HOFF,262,30)
590 CALL SOUND(QTR,392,0)
600 CALL SOUND(QTROFF,262,30)
610 CALL SOUND(HALF,330,0)
620 CALL SOUND(HOFF,262,30)
630 CALL SOUND(QTR,392,0)
640 CALL SOUND(QTROFF,262,30)
650 CALL SOUND(WHOLE,330,0)
660 CALL SOUND(WHOLEOFF,262,30)

670 FOR C=1 TO 5
680 CALL SOUND(QTR,330,0)
690 CALL SOUND(QTROFF,262,30)
700 NEXT C

710 CALL SOUND(QTR,392,0)
720 CALL SOUND(QTROFF,262,30)
730 CALL SOUND(QTR,262,0)
740 CALL SOUND(QTROFF,262,30)
750 CALL SOUND(QTR,262,0)
760 CALL SOUND(QTROFF,262,30)
770 REM  CALL SOUND(QTR,294,0)    
780 REM  CALL SOUND(10,262,30)    
790 CALL SOUND(QTR,330,0)
800 CALL SOUND(250,262,30)
810 NEXT X  

820 CALL SOUND(QTR,440,0)
830 CALL SOUND(QTROFF,262,30)
840 CALL SOUND(QTR,330,0)
850 CALL SOUND(QTROFF,262,30)
860 CALL SOUND(QTR,440,0)
870 CALL SOUND(QTROFF,262,30)
880 CALL SOUND(QTR,330,0)
890 CALL SOUND(QTROFF,262,30)
900 CALL SOUND(QTR,440,0)
910 CALL SOUND(QTROFF,262,30)
920 CALL SOUND(QTR,330,0)
930 CALL SOUND(QTROFF,262,30)
940 CALL SOUND(QTR,294,0)
950 CALL SOUND(QTROFF,262,30)
960 CALL SOUND(QTR,330,0)
970 CALL SOUND(QTROFF,262,30)
980 CALL SOUND(EIGHT,330,0)
990 CALL SOUND(EOFF,262,30)
1000 CALL SOUND(EIGHT,330,0)
1010 CALL SOUND(EOFF,262,30)
1020 CALL SOUND(QTR,523,0)
1030 CALL SOUND(QTROFF,262,30)
1040 CALL SOUND(QTR,494,0)
1050 CALL SOUND(QTROFF,262,30)
1060 CALL SOUND(HALF,494,0,294,0)
1070 CALL SOUND(HOFF,262,30)
1080 CALL SOUND(EIGHT,262,0)
1090 CALL SOUND(EOFF,262,30)

1100 FOR C=1 TO 4
1110 CALL SOUND(EIGHT,294,0)
1120 CALL SOUND(EOFF,262,30)
1130 NEXT C

1140 CALL SOUND(QTR,294,0)
1150 CALL SOUND(QTROFF,262,30)
1160 CALL SOUND(QTR,330,0)
1170 CALL SOUND(QTROFF,262,30)
1180 CALL SOUND(QTR,392,0)
1190 CALL SOUND(QTROFF,262,30)
1200 CALL SOUND(EIGHT,330,0)
1204 CALL SOUND(EOFF,330,0)
1210 CALL SOUND(QTROFF,262,30)
1220 CALL SOUND(QTR,262,0)
1230 CALL SOUND(QTROFF,262,30)
1240 CALL SOUND(QTR,262,0)
1250 CALL SOUND(QTROFF,262,30)

Edited by TheBF, Wed Jan 3, 2018 11:13 AM.


#15 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,240 posts

Posted Wed Jan 3, 2018 11:35 AM

Yeah, it's not easy to do music... I'm wrestling with it now in assembly language. The advantage there is you have more direct control of the voice generators and you can do sound decay and other things, but it's a LOT of work and experimentation.

 

I was trying to replicate an effect I heard in an MSX game last night and was frustrated until I Googled "Reverb in 8-bit" and found out how to do it. Old NES games basically used two voice channels playing the exact same music, the second is just slightly offset in timing and softer. Replicating this in BASIC or the ISR sound player is monumentally difficult though.

 

You have about five usable octaves on the TI chip, but in practice you only can use four. (The fifth one is so high it hurts the ears.) Bass sounds are pretty much out; the TI is a flute player in a gang of saxophones and drums.

 

I've experimented with using the periodic noise generator on the 3rd voice to try and get a sawtooth-style sound, but it doesn't seem to work very well. The first problem is the low octaves are all but useless; they just make a very nasty stuttering sound, so you have to go to at least the 3rd octave before you get distinct tones. The second problem is it's quieter than the regular square wave at identical attenuations and doesn't blend well.

 

Also, I hate to say this... But the TI sound chip is not as good as other chips released in the same time frame. :(

 

I always knew and accepted the SID chip as a better product, but even the General Instrument AY-3-8910 that's in the MSX system is better. Notably:

  • 12-bit frequency range instead of 10-bit, which means 4095 unique pitches over the 1024 on the TI chip. This gives it two full extra octaves of range at the top and bottom.
    • This was not entirely the sound chip's fault though; the internal 3mhz clock on the TI-99/4a also determines frequency
  • Built-in waveform support for triangle and sawtooth on the voice channels, although you apparently could only turn them on universally, not per voice


#16 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,531 posts
  • Location:Denmark

Posted Wed Jan 3, 2018 12:33 PM

I've experimented with using the periodic noise generator on the 3rd voice to try and get a sawtooth-style sound, but it doesn't seem to work very well. The first problem is the low octaves are all but useless; they just make a very nasty stuttering sound, so you have to go to at least the 3rd octave before you get distinct tones. The second problem is it's quieter than the regular square wave at identical attenuations and doesn't blend well.

 

I use periodic noise for bass all the time. The frequency can be controlled by frequency of the the 3rd voice channel, which has to be set about 4 octaves higher than the desired bass note. Since this produces a high pitched sound in the voice channel, the volume of the voice channel usually has to be set to zero. Another problem is that it's not exactly 4 octaves higher, which would correspond to a multiplication of the frequency by 16 (2*2*2*2), but the actual factor is 15. So if the voice channel is audible it's also off key.

 

The Sega Master System's version of the TI sound chip used a factor of 16 which made it easier to use periodic noise for bass, and if you use a tracker like MOD2PSG2 designed for the SMS, you just have to set channel 3 four octaves higher than the desired bass note. You can then export the result to VGM, and Tursi's VGM tools can automatically convert the bass notes to suitable values for our sound chip.



#17 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Wed Jan 3, 2018 1:02 PM

This is why I think getting a bit of music structure knowledge is a big help.  Part of the reason music sounds the way it does is because of the rules muscians have applied to it.

The rules change as styles change but some of them remain pretty constant over history once they were created.

(About 1000 yrs ago for western music with invention of notation for monks to learn the prayer songs faster)  :) 

 

I have had luck controlling the noise channel as Bass with channel 3 in Forth.

Here is some BASIC code that emulates what I did.  It seems to work.

The disconnect is that the bass frequency output is weirdly related to the Channel 3 Frequency.

Notice I started at 700Hz on Channel 3.

I have not done the math to correlate them.

100 FOR BASS=700 TO 3000 STEP 110
110 CALL SOUND (250,20000,30,20000,30,BASS,30,-4,0)
120 NEXT BASS


#18 TheBF OFFLINE  

TheBF

    Moonsweeper

  • 458 posts
  • Location:The Great White North

Posted Wed Jan 3, 2018 1:27 PM

I was able to get the pitch to track pretty well 2 octaves below the value in Hz by multiplying Channel3 * 3.762

This sounds pretty good but is not perfect across the octave.


10 REM Play a C scale with BASS below
90 FOR I=1 TO 8
100 READ NOTE
110 CALL SOUND (400,note,6,20000,30,note*3.762,30,-4,0)
120 NEXT I
1000 rem Notes of C major scale
1010 DATA 262,294,330,349,392,440,494,523

Edited by TheBF, Wed Jan 3, 2018 1:29 PM.


#19 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 4,067 posts
  • Location:Denmark

Posted Wed Jan 3, 2018 4:43 PM

Baseline Extended BASIC does not have the ability to do sound lists independently though.

 

Well, take a look here.



#20 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,240 posts

Posted Wed Jan 3, 2018 4:51 PM

 

Well, take a look here.

 

Yes, you can do a lot with the machine language commands to circumvent things.

 

My point is there is no built-in CALL subprogram or similar approach in baseline Extended BASIC to just shove music to the interrupts and be able to move on to something else.



#21 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 4,067 posts
  • Location:Denmark

Posted Wed Jan 3, 2018 4:55 PM

Yes, you can do a lot with the machine language commands to circumvent things.

  
As Kurt says: "without loading any assembler subroutines".
 

My point is there is no built-in CALL subprogram or similar approach in baseline Extended BASIC to just shove music to the interrupts and be able to move on to something else.

 
Well, that's what he does. Load the soundlist to VDP, start the soundlist, and you can move on to something else (it plays in the background). Remembering ...
  

Having music as a background process could only be achieved in 100% assembly or by writing an assembly routine to feed the sound chip independently.

  

;)


Edited by sometimes99er, Wed Jan 3, 2018 5:22 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users