|
Post by ollieha1 on Sept 24, 2018 16:35:50 GMT
Is anyone offering this? I want to use touchLua for its full worth and beyond, I thought I could use some pointers.
|
|
Guy
New Member
Posts: 18
|
Post by Guy on Sept 24, 2018 16:37:28 GMT
Just ask whatever questions, I'll help out, or anybody else who's here
|
|
|
Post by Admin on Sept 27, 2018 12:25:25 GMT
Just ask whatever questions, I'll help out, or anybody else who's here yes
|
|
|
Post by ollieha1 on Sept 27, 2018 23:42:10 GMT
Well to start, in touch lua you have these set commands in order to input coordinates data to make a sign wave in the examples section.
print 'creating sound' buffer = {} buffer.rate = 44100 buffer.channels = 2 buffer.bits = 16 buffer.data = {}
what are these arrays respective to? I tried to figure it out but so far i myself have found no distinction.
|
|
|
Post by Admin on Sept 28, 2018 9:16:35 GMT
Well to start, in touch lua you have these set commands in order to input coordinates data to make a sign wave in the examples section. print 'creating sound' buffer = {} buffer.rate = 44100 buffer.channels = 2 buffer.bits = 16 buffer.data = {} what are these arrays respective to? I tried to figure it out but so far i myself have found no distinction. please take a look at Audio Library Help, under playbuffer()
|
|
|
Post by ollieha1 on Sept 28, 2018 19:51:26 GMT
data : table having sound samples (table length = rate * channels * time_in_sec)
This appears to be where the timbre is dealt with, am I wrong?
|
|
|
Post by Admin on Sept 29, 2018 10:18:44 GMT
data : table having sound samples (table length = rate * channels * time_in_sec) This appears to be where the timbre is dealt with, am I wrong? It contains the sound wave data.
|
|
|
Post by ollieha1 on Oct 1, 2018 4:51:27 GMT
Cool, so now I’m working on a bass drum.
Another question a little different topic I have
draw.setscreen(1) draw.clear() draw.settitle('My Colors!') -- half transparent colors myred = { 1, 0, 0, 0.5 } mygreen = { 0, 1, 0, 0.5 } myblue = { 0, 0, 1, 0.5 }
width, height = draw.getport() radius = 80 x = width/2 y = height/2 draw.point(x, y, myblue) draw.sleep(10000)
Seems stupid but I’m lost on how to make this make multiple points...
|
|
|
Post by Admin on Oct 1, 2018 7:16:03 GMT
Cool, so now I’m working on a bass drum. Another question a little different topic I have draw.setscreen(1) draw.clear() draw.settitle('My Colors!') -- half transparent colors myred = { 1, 0, 0, 0.5 } mygreen = { 0, 1, 0, 0.5 } myblue = { 0, 0, 1, 0.5 } width, height = draw.getport() radius = 80 x = width/2 y = height/2 draw.point(x, y, myblue) draw.sleep(10000) Seems stupid but I’m lost on how to make this make multiple points... the code that actually makes the drawing is draw.point() so add more lines of it.
|
|
|
Post by ollieha1 on Oct 1, 2018 17:52:21 GMT
|
|
|
Post by ollieha1 on Oct 1, 2018 22:26:02 GMT
g.lineloop{vbo = triangle}
Another question, what is vbo or why is it equalized in a table?
|
|
|
Post by Admin on Oct 2, 2018 15:12:56 GMT
g.lineloop{vbo = triangle} Another question, what is vbo or why is it equalized in a table? lineloop() function takes an input table containing information what to draw. In this case it take a table containing vbo (vertex buffer object) to draw line loop. to know how to deal with Lua tables: lua-users.org/wiki/TablesTutorialto learn about lineloop() please refer to Nitro Library Help.
|
|
|
Post by ollie ha on Jun 16, 2019 19:44:52 GMT
draw me a sawtooth wave on the sin wave program
|
|
|
Post by Admin on Jun 23, 2019 6:52:17 GMT
draw me a sawtooth wave on the sin wave program Draw this function Sawtooth = function (x) return x % 4 end
|
|
|
Post by ollieha on Jul 10, 2019 1:12:05 GMT
what does the 4% mean
|
|