This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cranium's profile picture

How fast can the computer process?

Started by Cranium, 05 September 2012 - 09:33 PM
Cranium #1
Posted 05 September 2012 - 11:33 PM
I am looking into making a super-complicated noteblock player that will send out redstone pulses depending on a pre-determined table for each song. But first, I wanted to know how fast they can execute signals. I was thinking that my first song could be video game related, but for me, timing is everything.
I have seen noteblock fields in vanilla, but the tempo never sounded right. I thought, "How awesome would it be if this were computer-controlled?"
I will need bundled cables to pulse the signals quite rapidly, on multiple sides at once, and not lag. Before writing and building this, I want to know if it can be done?
NIN3 #2
Posted 05 September 2012 - 11:36 PM
Sounds like it can, since in my experiance on a server is that it happens almost instantaniously. And, sending multiple signals through bundled cable is possible.
I dont know if it will send to multiple bundled cables at the same time though.
Cranium #3
Posted 05 September 2012 - 11:41 PM
So the limit would likely be the cables? Is it that i will be sending conflicting signals out al at once?
NIN3 #4
Posted 05 September 2012 - 11:45 PM
Well, if the computer sends out signals too one cable, then for sure it will work just fine. I think that having multiple ones will work fine too, but im not sure.

So, for example, if I wanted to activate blue and purple, I would write

rs.setBundledOutput("right", colors.black+colors.white)

then the next like, setting dif colors, would shut them off (if they are not turned on again, thus leaving them on).
Cranium #5
Posted 05 September 2012 - 11:52 PM
How did you get blue and purple from black and white?
MysticT #6
Posted 06 September 2012 - 12:12 AM
Well, it's definetly possible, but the tempo will be an issue, but not because of the computer but the cables and noteblocks. You need to send pulses to activate the noteblock and they can't be too short or it won't update the redstone.
I made some programs and apis for this, you can take a look at them to know how to do it.
Cranium #7
Posted 06 September 2012 - 01:14 AM
Well, it's definetly possible, but the tempo will be an issue, but not because of the computer but the cables and noteblocks. You need to send pulses to activate the noteblock and they can't be too short or it won't update the redstone.
I made some programs and apis for this, you can take a look at them to know how to do it.
You're talkingv about your noteblock api and player? I'll check them out, I just wanted to know the speed limits before remaking "Through the Fire and Flames" by Dragonforce…
Kingdaro #8
Posted 06 September 2012 - 01:39 AM
I tried.

It's impossible to get your music to a BPM that doesn't have a wait time divisible by 0.05.

Meaning you can do BPMs such as: 1200, 600, 400, 300, 240, 200, etc.

You should be good with dragonforce though, it's at 200 BPM. It's more of an issue with timing accuracy than it is with speed - lua is perfectly fast enough.
Cranium #9
Posted 06 September 2012 - 03:56 AM
I never actually intended on dragonforce, just the high notecount was the first thing that popped into my head. I think i'll stick with the classics first…like beethoven and such :D/>/>
Kingdaro #10
Posted 06 September 2012 - 03:59 AM
Good luck with that.
KaoS #11
Posted 06 September 2012 - 06:51 AM
I wouldn't use cables at all, ever since using bundled cables for rednet didn't work so great for me I avoid them unless I am building a computercraft free project. What I would do is build note clusters, computers surrounded by note blocks and one side with a modem, that computer knows the notes of those sides and waits to be told to play them… end product: send any note in a rednet message and it will be picked up and played. good luck, sounds like fun
Cranium #12
Posted 06 September 2012 - 03:31 PM
I wouldn't use cables at all, ever since using bundled cables for rednet didn't work so great for me I avoid them unless I am building a computercraft free project. What I would do is build note clusters, computers surrounded by note blocks and one side with a modem, that computer knows the notes of those sides and waits to be told to play them… end product: send any note in a rednet message and it will be picked up and played. good luck, sounds like fun
That makes sense. The wireless modem would be faster. Hmm…would be fun to code all of that. :D/>/>
KaoS #13
Posted 06 September 2012 - 03:36 PM
if there is a way to simulate pressing a button you can actually change a note mid song… the code isn't so bad. most of it is just repeating the same thing with different notes

Edit: another advantage is that you can play notes 0.001 secs apart if they are done by different PCs
kazagistar #14
Posted 06 September 2012 - 07:51 PM
Note: if you want to get exact tick timings, you can use a redstone loop which you alternate every time you get a change of state.
KaoS #15
Posted 07 September 2012 - 11:06 AM
Nice idea dude! never would've thought of that
KaoS #16
Posted 13 September 2012 - 11:49 AM
Has there been any progress on this? I would love to see the finished product and how you did it
Cranium #17
Posted 13 September 2012 - 04:32 PM
I am very behind schedule. I know absolutely NOTHING about making music….