Hi, I have just wirte a simple patch to record my guitar and play it emmediately after automatically. I used fiddle to detect a note that triggered the bang to start recording and again to stop it at the same time it turned tabplay~ on.
The patch worked fine the first day but didn't work at all on the next. And I did not change a bit of it!
How can I use tabwrite~ effectivelly to record my guitar on a table and play it immediately after?
Thanks in advance
Marcelo Carneiro
- 
				
				
				
				Problems with tabwrite~ 
 
- 
				
				
				
				I don't know why it worked the first time, but it probably shouldn't have. The 
- 
				
				
				
				Thanks a lot. Is it possible to do that at the same time I am 'sending' information (the recording of my guitar) to the [tabwrite~]? I mean, should I specify a random number of samples to initialize it, or have to compute new numbers at any seconds? 
 Thanks again
 Bests for you
- 
				
				
				
				You can use the [resize( message to change the number of samples in the table. [resize 10000( 
 |But, depending on what you're doing, it would probably just be easier to just start off with a 
- 
				
				
				
				@Maelstorm said: You can use the [resize( message to change the number of samples in the table. [resize 10000( 
 |Hi. I made something in this direction. [0 60 62 64 64 67 67 67 67 64 64 65 65 65 65 65 65( 
 |\
 |
 || 
 [-1] *** to take away the first 0 of the message
 |
 [resize $1(
 |
 *** in fact, it is connected back to the first send boxThis way every change in the notes message resizes the table. But when I change from inserting pitches manually to reading from a txt file, it does not work! I mean: [read notes.txt( 
 |\
 |
 |
 *** in this case, it returns 2. I suppose 1 for 'read' and 2 for 'notes.txt'
 |
 [-1] *** to take away the first 0 of the message
 |
 [resize $1(
 |
 *** in fact, it is connected back to the first send boxHow can one feed a table via [read file.txt( and work with it as a list indeed? All the best, 
 A R SThe more we think we know about the greater the unknown (Neil Peart) 
- 
				
				
				
				The [read( message is going straight to the table, and it is the table that understands the message and loads the file. [list length] is just getting "read note.txt" as a list, so you're just resizing the table to 1. In order to get the size of the list in the file, you'll have to load it into [textfile] first. Then you can read out the list out of it, get the length, and put it in the table: [read notes.txt, rewind, bang( 
 |
 [textfile]
 |
 [t l l]
 | |
 || | 
 | [resize $1(
 | |
 |
 |
 |Also, make sure you're using [t ] to ensure everything executes in the right order. The way you have it patched, you can't tell for sure whether the table will be resized before the file is read. 
- 
				
				
				
				Thank you once again, Maelstorm. It works just fine! Keep rocking, 
 A R SThe more we think we know about the greater the unknown (Neil Peart) 
