Sooo, I tend to build a lot of Redstone stuff on my own, but now that we have a forum (YES) I thought I'd share something.
I've been playing with the Piston Mod (since we get them in vanilla soon) and I found they have tremendous utility in Redstone circuits. I built some compact counters and flip-flops, but then I thought of a simple modification that would make my counter more useful as a stand-alone device.
What I got is a compact, programmable music machine. This proof-of-concept device can play a sixteen-beat song with four distinct notes, and it requires just four note blocks, allowing the user to stand in one place.
The last screen shows how the blocks are "read" as they pass by. This exact same method works great for counters or compact ROM.
A longer song could be made by creating a larger "loop" of stone/glass blocks, and such a loop could stack far more compactly than the one in my prototype. A more complex "instrument" (or set of instruments) is even easier: just make the assembly wider.
The new pistons look faster, so they should allow for faster songs, but if pistons don't move quickly enough for a particular instrument, it's trivial to run a second "track" in parallel that's delayed by a half period.
An idea though: those 4 blocks of width can actually code for 16 different notes, so long as you don't need to play any chords. Make a decoder and now you have over an octave of range!
Rollback Post to RevisionRollBack
Hans Lemurson's Thread of Links:http://www.minecraftforum.net/topic/371610-hans-lemursons-thread-of-links/
Look here to find links to my inventions, creations, and my Youtube channel featuring Amazing Creations of Mine (Redstone engineering FTW!!!) and charming Music-Videos about clones. I also made "Minecraft in Minecraft" (2D platformer/building game). I'm currently trying to make a computer.
An idea though: those 4 blocks of width can actually code for 16 different notes, so long as you don't need to play any chords. Make a decoder and now you have over an octave of range!
The trouble here is you would have to move all 4 blocks every beat. I guess with a more vertical setup this wouldn't be a big deal. They also wouldn't need to be right next to each other.
I like this idea, I was going to try doing something similar using a counter and boolean logic with AND and OR gates, optimized so each note block was on its own output. Obviously this would have been extremely large and clunky in practice.
Bill_Zarr: I'm in the process of a read/write system, because that would have applications far beyond note blocks. I've engineered a "stack" (in the programming sense) for glass blocks, and cobblestone blocks can easily be generated and destroyed. I've not yet worked out how to perform the actual reads and writes with any speed, but I might put some time into that.
Hans Lemurson: Good idea! That might work best for something like the bass guitar instrument, whereas a "drumset" should probably support "chords".
JacaByte: all four blocks do move every beat, because chords are supported. The current song is the first four measures of "Mary Had A Little Lamb" so there aren't any chords shown, but I've tested it with chords and it worked well. Also, the setup is indeed "vertical" for reading the blocks; the entire device just ended up elongated.
I just read the first comment and realized how it works. REALLY clever! I have no idea how you could have thought of that.
My first project with pistons was to build an auto-loading TNT cannon. The cannon end itself was easy, but I wasn't satisfied with the loading mechanism. It involved carefully loading TNT into a staircase of pistons, and the whole setup required two pistons for each TNT loaded. So, I figured I could build a system where TNT was loaded into "clips" and fed into the cannon, pushed at the back by a cobblestone generator. I didn't want cobblestone getting into my cannon mechanism though, so I put a piece of glass at the end of the clip. A circuit would detect when the clip ran out of TNT and hit the glass block, and would stop loading.
From there, it was natural to see that this could be used to store data. The TNT mechanism was horizontal, so I worked out that you need a vertical setup to read a set of blocks in parallel.
For a long time, in fact since Note-blocks were first introduced, I pondered what the densest form of memory would be. I wanted to make a REAL music-box rather than a long chain of sequentially triggered note-blocks. I wanted to make a music-player that would be able to play ANY song so long as the proper data was loaded into it, rather than having to individually huge numbers of note-blocks. This is what actually lead me to try to figure out how to get a delay-line memory system working.
Glass 'n Stone punchcards though represent the same density of data storage as Repeaters, but have the HUGE advantage of being static and manually programmable.
I just had an idea for another improvement to your system:
-Make the "Reading units" pulse.
Why? Because otherwise, a potential problem with this is that you wouldn't be able to play the same not twice in a row. If the "Reader" is pulsing current through however, then even if the same note comes up twice, the note-block will still receive 2 distinct signals to play. The read-pulse should be on the same cycle as the block-shifting so there is exactly one pulse per encoded note.
Rollback Post to RevisionRollBack
Hans Lemurson's Thread of Links:http://www.minecraftforum.net/topic/371610-hans-lemursons-thread-of-links/
Look here to find links to my inventions, creations, and my Youtube channel featuring Amazing Creations of Mine (Redstone engineering FTW!!!) and charming Music-Videos about clones. I also made "Minecraft in Minecraft" (2D platformer/building game). I'm currently trying to make a computer.
I just had an idea for another improvement to your system:
-Make the "Reading units" pulse.
Why? Because otherwise, a potential problem with this is that you wouldn't be able to play the same not twice in a row. If the "Reader" is pulsing current through however, then even if the same note comes up twice, the note-block will still receive 2 distinct signals to play. The read-pulse should be on the same cycle as the block-shifting so there is exactly one pulse per encoded note.
Look carefully; I've already done this. In all three pictures, there are sequences of more than one glass block. Between the note blocks and the rest of the assembly is a set of four torches (only two are visible because they're staggered) that are gated when the clock ticks. You can see the gate wiring in the bottom left of the second picture. The same signal that triggers the vertical pistons also holds the torches off. This serves another purpose: when the blocks shift, all of the detectors read as if there are no blocks, so the torches would all go high. The clock line prevents that.
I don't really know how fast the pistons can get, but if they are relatively fast, that means you can do songs which have notes really quickly played in a row. The problem is, other notes might be slower, with the occasional quick notes. So for songs like that, it might be a good idea to have a seperate stone/glass cycle, with only one "data line", as densely packed as possible. (I've worked out that I could put over a hundred blocks in a space of 10x10x2, excluding the pistons that push it from the outside.)
This data line would be pushed by a clock as fast as the fastest notes, and its "output" would play ONE note on the music box. This way, mostly slow songs with some quick notes can probably be made smaller. (Think of the Harry Potter theme, for example.)
With the mod pistons, you can push a note every 0.8 seconds. (The Mojang pistons look a little faster, but it's tough to say without being able to play with them.) My solution to the speed issue is to run multiple lines in parallel for the same note and delay the signal from one of the lines by half a period. So, for most instruments, there would be two lines with one delayed 0.4 seconds, and for something like a high-hat or a snare, there would be four lines, staggered by 0.2 seconds. I'm not entirely sure what you're suggesting, if that's not it.
Alternatively, you could construct a hybrid system where a single glass block activates a short sequence, like a common melody or beat. These pistons would cycle much slower, further conserving space.
Look carefully; I've already done this. In all three pictures, there are sequences of more than one glass block. Between the note blocks and the rest of the assembly is a set of four torches (only two are visible because they're staggered) that are gated when the clock ticks. You can see the gate wiring in the bottom left of the second picture. The same signal that triggers the vertical pistons also holds the torches off. This serves another purpose: when the blocks shift, all of the detectors read as if there are no blocks, so the torches would all go high. The clock line prevents that.
Ah, I see. I should have guessed that if you had the know-how to make a device like this in the first place that you'd have that figured out as well.
Another thing I didn't realize due to not looking/reading closely enough is that you're using glass as the "ON" signal for notes. The way I had things envisioned, the conductivity of stone would have carried the "ON" signal and the majority of the loop would be glass.
Jeb_'s pistons seem like they will operate fast enough to be able to produce a reasonably fast tempo and the blocks will be updated instantly (faster than the animation for the blocks proceeds).
Rollback Post to RevisionRollBack
Hans Lemurson's Thread of Links:http://www.minecraftforum.net/topic/371610-hans-lemursons-thread-of-links/
Look here to find links to my inventions, creations, and my Youtube channel featuring Amazing Creations of Mine (Redstone engineering FTW!!!) and charming Music-Videos about clones. I also made "Minecraft in Minecraft" (2D platformer/building game). I'm currently trying to make a computer.
I've been playing with the Piston Mod (since we get them in vanilla soon) and I found they have tremendous utility in Redstone circuits. I built some compact counters and flip-flops, but then I thought of a simple modification that would make my counter more useful as a stand-alone device.
What I got is a compact, programmable music machine. This proof-of-concept device can play a sixteen-beat song with four distinct notes, and it requires just four note blocks, allowing the user to stand in one place.
Here are a few shots.
[simg]http://i.imgur.com/jwq3P.png[/simg]
[simg]http://i.imgur.com/JjbLz.jpg[/simg]
[simg]http://i.imgur.com/Z9R1c.png[/simg]
The last screen shows how the blocks are "read" as they pass by. This exact same method works great for counters or compact ROM.
A longer song could be made by creating a larger "loop" of stone/glass blocks, and such a loop could stack far more compactly than the one in my prototype. A more complex "instrument" (or set of instruments) is even easier: just make the assembly wider.
The new pistons look faster, so they should allow for faster songs, but if pistons don't move quickly enough for a particular instrument, it's trivial to run a second "track" in parallel that's delayed by a half period.
An idea though: those 4 blocks of width can actually code for 16 different notes, so long as you don't need to play any chords. Make a decoder and now you have over an octave of range!
Look here to find links to my inventions, creations, and my Youtube channel featuring Amazing Creations of Mine (Redstone engineering FTW!!!) and charming Music-Videos about clones. I also made "Minecraft in Minecraft" (2D platformer/building game). I'm currently trying to make a computer.
The trouble here is you would have to move all 4 blocks every beat. I guess with a more vertical setup this wouldn't be a big deal. They also wouldn't need to be right next to each other.
I like this idea, I was going to try doing something similar using a counter and boolean logic with AND and OR gates, optimized so each note block was on its own output. Obviously this would have been extremely large and clunky in practice.
Hans Lemurson: Good idea! That might work best for something like the bass guitar instrument, whereas a "drumset" should probably support "chords".
JacaByte: all four blocks do move every beat, because chords are supported. The current song is the first four measures of "Mary Had A Little Lamb" so there aren't any chords shown, but I've tested it with chords and it worked well. Also, the setup is indeed "vertical" for reading the blocks; the entire device just ended up elongated.
My first project with pistons was to build an auto-loading TNT cannon. The cannon end itself was easy, but I wasn't satisfied with the loading mechanism. It involved carefully loading TNT into a staircase of pistons, and the whole setup required two pistons for each TNT loaded. So, I figured I could build a system where TNT was loaded into "clips" and fed into the cannon, pushed at the back by a cobblestone generator. I didn't want cobblestone getting into my cannon mechanism though, so I put a piece of glass at the end of the clip. A circuit would detect when the clip ran out of TNT and hit the glass block, and would stop loading.
From there, it was natural to see that this could be used to store data. The TNT mechanism was horizontal, so I worked out that you need a vertical setup to read a set of blocks in parallel.
Glass 'n Stone punchcards though represent the same density of data storage as Repeaters, but have the HUGE advantage of being static and manually programmable.
I just had an idea for another improvement to your system:
-Make the "Reading units" pulse.
Why? Because otherwise, a potential problem with this is that you wouldn't be able to play the same not twice in a row. If the "Reader" is pulsing current through however, then even if the same note comes up twice, the note-block will still receive 2 distinct signals to play. The read-pulse should be on the same cycle as the block-shifting so there is exactly one pulse per encoded note.
Look here to find links to my inventions, creations, and my Youtube channel featuring Amazing Creations of Mine (Redstone engineering FTW!!!) and charming Music-Videos about clones. I also made "Minecraft in Minecraft" (2D platformer/building game). I'm currently trying to make a computer.
Look carefully; I've already done this. In all three pictures, there are sequences of more than one glass block. Between the note blocks and the rest of the assembly is a set of four torches (only two are visible because they're staggered) that are gated when the clock ticks. You can see the gate wiring in the bottom left of the second picture. The same signal that triggers the vertical pistons also holds the torches off. This serves another purpose: when the blocks shift, all of the detectors read as if there are no blocks, so the torches would all go high. The clock line prevents that.
Then stop embarrassing yourself.
With the mod pistons, you can push a note every 0.8 seconds. (The Mojang pistons look a little faster, but it's tough to say without being able to play with them.) My solution to the speed issue is to run multiple lines in parallel for the same note and delay the signal from one of the lines by half a period. So, for most instruments, there would be two lines with one delayed 0.4 seconds, and for something like a high-hat or a snare, there would be four lines, staggered by 0.2 seconds. I'm not entirely sure what you're suggesting, if that's not it.
Alternatively, you could construct a hybrid system where a single glass block activates a short sequence, like a common melody or beat. These pistons would cycle much slower, further conserving space.
Here's a schematic: link
Ah, I see. I should have guessed that if you had the know-how to make a device like this in the first place that you'd have that figured out as well.
Another thing I didn't realize due to not looking/reading closely enough is that you're using glass as the "ON" signal for notes. The way I had things envisioned, the conductivity of stone would have carried the "ON" signal and the majority of the loop would be glass.
Jeb_'s pistons seem like they will operate fast enough to be able to produce a reasonably fast tempo and the blocks will be updated instantly (faster than the animation for the blocks proceeds).
Look here to find links to my inventions, creations, and my Youtube channel featuring Amazing Creations of Mine (Redstone engineering FTW!!!) and charming Music-Videos about clones. I also made "Minecraft in Minecraft" (2D platformer/building game). I'm currently trying to make a computer.