James app-2008 Posted August 6, 2020 Share Posted August 6, 2020 Hello can someone write out a simple example of connecting a program to a data file containing variables? I want to write music files and use variables. I think my programs re set the variables to zero. could someone show me by using an example how to have and use a variable file? I could use the help Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted August 6, 2020 Share Posted August 6, 2020 8 minutes ago, James app-2008 said: Hello can someone write out a simple example of connecting a program to a data file containing variables? I want to write music files and use variables. I think my programs re set the variables to zero. could someone show me by using an example how to have and use a variable file? I could use the help What language? Basic, Extended Basic, Forth, Pascal, C, Assembler, ...? ...lee 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted August 6, 2020 Share Posted August 6, 2020 We also have LISP, LOGO and GPL plus some others. 1 Quote Link to comment Share on other sites More sharing options...
pixelpedant Posted August 6, 2020 Share Posted August 6, 2020 Here is an example of writing, then reading, some music data to/from file for use by CALL SOUND in TI BASIC (or Extended BASIC), presuming you have a DSK1: 5 REM WRITING TO DISK 10 OPEN #1:"DSK1.MUSIC",INTERNAL 15 PRINT #1:224,370,12 20 PRINT #1:224,294,12 25 PRINT #1:224,247,12 30 PRINT #1:224,294,12 35 PRINT #1:224,370,12 40 PRINT #1:224,294,12 45 PRINT #1:224,220,12 50 CLOSE #1 55 REM READING FROM DISK 60 OPEN #1:"DSK1.MUSIC",INTERNAL 65 FOR BEAT=1 TO 7 70 INPUT #1:DUR,T,V 75 CALL SOUND(DUR,T,V) 80 NEXT BEAT 85 CLOSE #1 4 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.