notwhoyouthink Posted August 10, 2017 Share Posted August 10, 2017 I was tinkering around with the TI under Classic99, and i have come up with the following values for the highest and lowest possible audible sounds i could get it to produce: 109.26625 & 10650.85714 tested with 1 X=[various values] 2 CALL SOUND(500,X,0) RUN until i found either a bad value or a value i could not hear at 100% PC speaker volume. Just thought some may find this interesting for whatever reason. Quote Link to comment Share on other sites More sharing options...
carlsson Posted August 10, 2017 Share Posted August 10, 2017 If I recall correctly, the range of sound frequencies the SN76489 (or TMS9919 as it is called on the TI-99/4A) depends on the input clock frequency. In particular on Z80 systems like Colecovision, Sord M5 and others which for simplicity use the video/CPU clock of 3.5 MHz it bottoms out at 110 Hz which is A-1 or something similar in terminology. Not a particularly low note. I understand the 99 clocks at 3 MHz so pretty much the same range. The SN76489 was also used with a few 6502 based systems like the Acorn BBC Micro/Master and the VTech Creativision/Laser 2001. These were clocked at 2 MHz, and from practical testing it seems the sound chip then will produce lower notes but also not as dog scaring high pitches on the other end of the scale. The General Instruments AY chip has a bigger frequency resolution (12 bits instead of 10 bits) which it seems to use to start the frequencies lower, which is I've understood in particular Colecovision users get the Super Games Module with an AY chip to get bass notes plus any other improvements the AY has over the SN. Personally I'm not sure the differences are that great. The 110 Hz as a lower end is also found on some systems with proprietary sound chips like the Commodore 16 and Plus/4 whose TED chip for some reason bottoms out there as well. If the sound chip on the TI was fed another clock frequency, its sound range likely would differ. 1 Quote Link to comment Share on other sites More sharing options...
digdugnate Posted August 10, 2017 Share Posted August 10, 2017 check out this link- http://www.unige.ch/medecine/nouspikel/ti99/tms9919.htm for more info on the tms9919 Quote Link to comment Share on other sites More sharing options...
carlsson Posted August 10, 2017 Share Posted August 10, 2017 Interesting fact about the jumper to select CPUCLK or GROMCLK. What happens if you change it without replacing the sound chip, do you get frequencies in the range of 13.75 Hz - 1330 Hz? Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted August 10, 2017 Share Posted August 10, 2017 “Section 20: Sound” of the Editor/Assembler Manual details, pretty much, all you want to know about generating sound on the TI-99/4A. Much of this information is repeated in the TI Extended Basic Manual. The possible range is 110 Hz – 55,938 Hz. Your observation re the highest frequency you could hear is in line with what most of us can hear—but, you can go higher, as noted above, likely irritating any nearby, non-human wildlife. ...lee 3 Quote Link to comment Share on other sites More sharing options...
carlsson Posted August 10, 2017 Share Posted August 10, 2017 That is assuming the TV speaker is able to reproduce those very high frequencies. Has anyone tested this with their pets to see if they react to the TI or other SN based system? I understand that cats have an even larger range of hearing than dogs have. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted August 10, 2017 Share Posted August 10, 2017 It is possible to play low frequency sounds using periodic noise. I have used that a lot. The F18A has a register for setting the GROM clock. 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted August 10, 2017 Share Posted August 10, 2017 The LFSR? Yes, I've experimented with it too. It produces a different timbre than the square wave and with an entirely different frequency table for music routines, plus that it effectively cuts off one of the square wave voices since the frequency register is tied to it. So it either is three voices of square wave plus noise at a few set frequencies, or two voices of square wave plus either LFSR bass or fully programmable white noise. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted August 10, 2017 Share Posted August 10, 2017 The LFSR? Yes, I've experimented with it too. It produces a different timbre than the square wave and with an entirely different frequency table for music routines, plus that it effectively cuts off one of the square wave voices since the frequency register is tied to it. So it either is three voices of square wave plus noise at a few set frequencies, or two voices of square wave plus either LFSR bass or fully programmable white noise. You can alternate between playing bass notes using periodic noise and 'percussion' using white noise. And while you play white noise you can play square wave for added depth. If you use a tracker like MOD2PSG2 of DefleMask in combination with Tursi's VGM player this is quite manageable. Because of the frequency calculations I wouldn't want to mess around with it from BASIC or the standard TI assembly sound list player, however. Quote Link to comment Share on other sites More sharing options...
notwhoyouthink Posted August 10, 2017 Author Share Posted August 10, 2017 Am i right in thinking the TI is just rounding everything off?I.E. my 109.26625 just gets rounded off to 110? Quote Link to comment Share on other sites More sharing options...
PeteE Posted August 10, 2017 Share Posted August 10, 2017 You can alternate between playing bass notes using periodic noise and 'percussion' using white noise. And while you play white noise you can play square wave for added depth. If you use a tracker like MOD2PSG2 of DefleMask in combination with Tursi's VGM player this is quite manageable. Because of the frequency calculations I wouldn't want to mess around with it from BASIC or the standard TI assembly sound list player, however. Can you go into more detail about the frequency calculations? I had to transpose the low notes in the Tilda music, so it would be nice to have them play more accurately through the periodic noise with frequency from channel 2. I wrote my own music converter in C, so I should be able to handle the calculations. Am i right in thinking the TI is just rounding everything off? I.E. my 109.26625 just gets rounded off to 110? You can see how the frequencies get converted to dividers on the sound chip register here. It does get rounded, but more so for high notes than low notes. The divider is calculated by "round(111860.8 / freq)" so 110 is 1017 and 109.26625 would be 1024, but the divider limit is 3FF hex = 1023 decimal, so the actual lowest freq is 109.3458. Quote Link to comment Share on other sites More sharing options...
atrax27407 Posted August 10, 2017 Share Posted August 10, 2017 There was a program "back in the day" that used high frequency sound generated by the TI as a pest/mosquito repellent. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted August 10, 2017 Share Posted August 10, 2017 Can you go into more detail about the frequency calculations? I had to transpose the low notes in the Tilda music, so it would be nice to have them play more accurately through the periodic noise with frequency from channel 2. I wrote my own music converter in C, so I should be able to handle the calculations. AFAIK, the frequency of channel 2 needs to be 15 times higher than the desired frequency, and the attenuation should be set to 15 (mute) unless you want to hear a high pitched off-key sound. In the SN76489A variant used in the Sega Master System etc. the frequency needs to be 16 times higher, corresponding to exactly 4 octaves. This is a lot easier to work with and will not produce off-key sounds. 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted August 10, 2017 Share Posted August 10, 2017 When I worked with the Creativision, I also found that the relation between square wave and LFSR frequencies was 1/15. I used these values, on a 2 MHz system so I don't think they will be useful at all on the TI-99/4A: ; C-1 to D#4 with square wave .word $3f0b,$3c02,$380c,$3509,$3209,$2f0b .word $2d01,$2a08,$2802,$250e,$230c,$210c .word $1f0e,$1e01,$1c06,$1a0c,$1904,$170e .word $1608,$1504,$1401,$120f,$110e,$100e .word $0f0f,$0f00,$0e03,$0d06,$0c0a,$0b0f .word $0b04,$0a0a,$0a00,$0907,$080f,$0807 .word $070f,$0708,$0701,$060b ; C-1 to D#4 with LFSR .word $1010,$1000,$0f02,$0e04,$0d08,$0c0c .word $0c00,$0b06,$0a0c,$0a02,$0908,$0900 .word $0808,$0800,$0709,$0702,$060c,$0606 .word $0600,$050b,$0506,$0501,$040c,$0408 .word $0404,$0400,$030d,$0309,$0306,$0303 .word $0300,$020d,$020b,$0208,$0206,$0204 .word $0202,$0200,$010e,$010d Quote Link to comment Share on other sites More sharing options...
Tursi Posted August 11, 2017 Share Posted August 11, 2017 I was tinkering around with the TI under Classic99, and i have come up with the following values for the highest and lowest possible audible sounds i could get it to produce: 109.26625 & 10650.85714 Be aware that the high end under emulation is not going to be correct for the hardware (and will depend on the sample rate you have set the emulator to). If set to 44100Hz, which is the highest Classic99 supports, the highest possible output is half that - 22050Hz. (If set to playback at 22050, which you may be, the maximum is half of that again...) The real hardware can approach 50khz, as suggested by the math above (although output filtering might restrict that). The divider is calculated by "round(111860.8 / freq)" so 110 is 1017 and 109.26625 would be 1024, but the divider limit is 3FF hex = 1023 decimal, so the actual lowest freq is 109.3458. You can actually go one step lower on the 99's version of the sound chip - '0' represents a step of 1024, so you can hit that 109.2Hz value. However I don't think you can get that count from TI BASIC. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.