Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Any efective way to to record/recreate analogue signal?

Archive: 19 posts


Ok. Here is my problem.
I would love to store some signals (both digital and analog) - idealy not just the values but also how long the value was on/off. In other words - way to record a analog signal and recreate it later.

Any "simple" ideas how to achieve this?
I was thinking about some sequencer activating seies of chips with selectors/counters etc that would be set to desirad values. And read later.
But I hoped there might be some sipler solution?
2011-03-01 11:28:00

Author:
Agarwel
Posts: 207


That's a pretty vague request. What exactly are you trying to do? Do you want the signals recorded to be used within the same level, or use a password system to carry it over to a different level? How long do you need the signals to be? Either way, it's probably going to have to be some form of digital data that mimics an analogue signal.2011-03-01 13:50:00

Author:
Xaif
Posts: 365


It hsould not be so long. Lets say 10 seconds (and I need one buffer. New recording can overwrite the previous one). And it should be used in the same level. So no ransmition via passwords needed.
I just want to take analog signal source. And use that generated signal (ar at least as much similar as possible) to be used at another time during the same level.

I was also thiking about using some area with moving hololine and emiting the tags in height close enought to the signal strength. So it would give me somethink like graph. And then reading this graph with another holo line with tag sensors. Im sut little afraid of the granularity of this. because even if I emit tags fast enough, I believe ome short peak can be missed... leading to some glitches :-/
So I hoped Im missing some function on some components and that there might be some more precise way.
2011-03-01 14:13:00

Author:
Agarwel
Posts: 207


I would use same kind systems as you but instead of height I would use batteries with different strength and read it with only one tag sensor.2011-03-01 14:25:00

Author:
waD_Delma
Posts: 282


I believe this could be done. A timer could be used to record the length of the signal - just have it start full and count down. You'll need an OR loop circuit to store the analog signal. When I was building my digital register, the first thing I did was build a one bit storing circuit. The side effect was that it didn't just store the digital component but stored the analog component and player data as well.

With the timer/register pair, playback would be accomplished by just outputting the stored analog component until the timer counts back up to full.

I'm interested in what you are using this for.
2011-03-01 14:29:00

Author:
Shanghaidilly
Posts: 153


Shanghaidilly:
Ah... looped OR gate sounds liek a good start. I knew I was missing something easy and that using huge selector (or emiting tags with propper batery) to store magnitude is not a best way :-D
But isng the AND gate little more practical? If Im correc,t it should be easier to reset? (AND is giving the lowest signal - so keeping 100 percent batery connected and just disconecting it for restarts may be easier than reseting looped OR gate.)

And the usage. I would like to create level with gamepaly based on ability to record/replay sackboy behaviour. So during the recording time I would need to store the controlinator outputs somewhere. So later on, I can hook them back to the controlinator inputs to recreate the movement as preciselly as possible.
2011-03-01 15:38:00

Author:
Agarwel
Posts: 207


The issue is while analogue components do exist like the timer, they all have a digital output - on or off. There's no way of the timer outputting the value it is currently at on its own. This can be achieved though through a series of other timers and counters, the compexity of which grows massively depending on duration of the recording and the accuracy of which you want (seconds vs milliseconds). This is also not really an analogue signal, instead a digital one mimicking the effects. While batteries give out varying signal strength there's no way of actually changing the strength of said signal once it's set, via an input. The emitting of batteries is a nice idea, but you'll need multiple emitters covering the amount of varying signal strengths you need, and again you're still only getting discrete amounts rather than a continuous set of values.

I think the battery idea is definitely the best to recorded the actual values being made, and then you'll have to resort to something like I mentioned before to record the duration of each value.
2011-03-01 15:41:00

Author:
Xaif
Posts: 365


Ahhhhh..... you're talking about recording a "variable" analog signal over a duration of approx. 10 seconds?

If you want a sample rate running at clock speed, that's 300 samples. I'm not sure emitting 300 objects would be a good thing.

So what is your required sample rate?
2011-03-01 16:21:00

Author:
Shanghaidilly
Posts: 153


Shanghaidilly:
Not sure. The bigger the better :-/
I thought even obout combining it with emiting "checkpoint tags" during recordng, that could actually help a lot (a guess that the way how the "rewind sackbot" was done). So the result would be combination of recorded button presses and followers of the tags marking the path.

Maybe actually limiting the original sackbot controls might be helpfull. I mean to transform all player input to the digital form (not sure how much that negaivelly affect gameplay). That way recording can be easier because I would need just to record binary data even for the sticks.
2011-03-01 16:29:00

Author:
Agarwel
Posts: 207


And the usage. I would like to create level with gamepaly based on ability to record/replay sackboy behaviour. So during the recording time I would need to store the controlinator outputs somewhere. So later on, I can hook them back to the controlinator inputs to recreate the movement as preciselly as possible.

What range of actions do you need? If it's just movement, a simple solution might be to let the recording sackbot emit a series of waypoints. It won't give precise replication but it'll be extremely effective, as well as memory efficient.
2011-03-01 16:51:00

Author:
munrock2
Posts: 96


I've done this - I created a record/playback system for controllinator-controlled sackbots.

To record analog inputs, my first version used a D latch implemented in gates. For the second version, in an effort to cut down thermo, I stored the analog input in a pair of timers (one per direction). Among other things, this allowed me to turn off the circuit board hosting those timers without losing the stored values. (The D-latch implemented in gates uses feedback, and the gates need to remain active, constantly feeding-back on itself, in order to keep the stored value intact. So using the timer cuts down on the amount of active logic that the simulator has to manage at any one time.)

In retrospect, storing the value in an OR gate with feedback (and clearing out the value each time it's recorded over, by briefly disabling the circuit board hosting it) probably would have been more efficient than the D-latch (fewer gates - the main thing is I'd have to zero out the old value to record a new one) and possibly the timer solution as well..

One thing to remember when setting up logic for a system like this: as it happens, recording analog values really isn't that complicated or resource-intensive. All signals include both an analog and digital part, and there are components that can store the analog part.

I considered breaking down the analog joystick input into digital, discretizing it with maybe 3 bits of resolution (that probably would have been adequate for a decent movement recording) - but it really seemed there was no point. I would need a sequencer to do the A/D conversion (simple as it is in that case...) - there would be more wiring to set up, and I'd need more components to store the recorded values. All to get downgraded recording capability.
2011-03-01 18:36:00

Author:
tetsujin
Posts: 187


tetsujin
And may I ask how did you dealt with the sampling of the signal?
I mean storing one value sounds pretty easy. But if you want to record lets say few secs and the input can change many times - does it mean you used for example 100 timers for each direction? To store the signal values at different times in some small intervals?
Or am I missing something?

Xaif:

The issue is while analogue components do exist like the timer, they all have a digital output - on or off.
Am I missing something here too? Because as far as I know (and used) the Timers had both outputs - on/off and then the analog teling how full it is.

munrock2:

What range of actions do you need?
To start with I would be satisfied with the basic actions. Movement / jump (these can be probably most tricky) and grabing would be nice.
As you Im still considering if I should use the waypoint system too. May be even combined somehow. Like placing exact jump spots etc. So the wayipoint would tell Sackbot where to move and the stored sygnal when to do it. Each of these system minimilizing the glitches of the other one.
2011-03-01 20:37:00

Author:
Agarwel
Posts: 207


tetsujin
And may I ask how did you dealt with the sampling of the signal?
I mean storing one value sounds pretty easy. But if you want to record lets say few secs and the input can change many times - does it mean you used for example 100 timers for each direction? To store the signal values at different times in some small intervals?


Well, the one I did was just a short recording - I think 16 samples, maybe less. I'm still experimenting with how much time I want to give to each sample, but it works out to about 2-4 seconds of recording depending on that interval time. Spawning about 16 sackbots with that recording system (and fully costumed, etc.) takes about half the thermo. Having sample times as high as 0.4s actually yielded decent results in terms of the sackbots' behavior...

So, yeah, basically I have one microchip that's a "controls sampler" - it captures and stores a single sample of the left-stick X axis, the R1 button, and the X button. The chip has an input for each control, plus one to tell the chip when it should be "active" (when it's time for that chip to do its recording or playback) and one input to tell it when it should be in "record mode", sampling a new value when it's having its turn. Each of those chips is connected to the proper control inputs, and then the outputs of all those chips are combined via three big OR gates.

I use a sequencer to select between the different samplers - though there were some complications with that - there's a little "dead time" when the sequencer resets, so I had to use different methods to smooth it out. (Basically, one of the samplers isn't fed by a battery on the sequencer, but rather by a NOR gate attached to all the batteries on the sequencer. Normally the "gap" wasn't a big deal, in playback his running would just stutter a bit - but it also meant he'd let go of something he was supposed to be holding on to...) Really I should have just used a selector with a timer feeding its "count up" input. That would have been simpler, possibly a bit less thermo-heavy, and (I think) would have avoided the "reset gap" issue.

The wiring can be a bit of a bear with this kind of approach: sixteen different samplers, each with five inputs and three outputs... it's a lot of wiring. In my first version I dealt with this by having each sampler also take, as input, the output of the previous sampler. In record mode, this output would be the current state of the controls, while in playback mode, it would be the playback from whichever sample is active. It made the wiring a lot nicer to deal with. I switched away from that approach hoping it would save thermo - but I may switch back, try that method again.

The waypoint system sounds like a good idea. I'd consider using it except I think for what I have planned there would be some issues with that approach... Like what if the sackbot is on a moving platform? I don't (necessarily) want him to jump off the edge, or jump fruitlessly into the air trying to reach a waypoint that's too far away...

I guess one way around that would be to make the waypoints physical, sticky objects... (Can holo stick to things?) Then they could move with the platform or whatever

(EDIT): xaif: You most certainly can get an analog output out of a timer. This is the whole basis of "dividers" in LBP2.
2011-03-01 23:29:00

Author:
tetsujin
Posts: 187


Shanghaidilly:
But isng the AND gate little more practical? If Im correc,t it should be easier to reset? (AND is giving the lowest signal - so keeping 100 percent batery connected and just disconecting it for restarts may be easier than reseting looped OR gate.)

If you loop an AND gate back on itself, how would you initialize it? One of the inputs (the one feeding from its line out), would always be false until a value is passed through but a value can't be passed through until both inputs are true.

To clear an OR gate storage, just create a microchip and run your OR gate onto a circuit node on it, and back out again, and back into itself. Then just turn that chip off to break the circuit and clear the value.
2011-03-02 05:37:00

Author:
tdarb
Posts: 689


To clear an OR gate storage, just create a microchip and run your OR gate onto a circuit node on it, and back out again, and back into itself. Then just turn that chip off to break the circuit and clear the value.

You just described how to make a transistor out of a microchip and a circuit node. Genius. Isn't there a simpler way to do it?
2011-03-02 06:07:00

Author:
munrock2
Posts: 96


tdarb:
As I said - I houw have connected 100% connected to the second input. (and disconnect this one for the reset function). AND gate does not need 100% on both signals to activate output. In the analogue logic - the AND gate is passing the lowest signal. (so in binary logick it needs all input 1 or it will give the lowest 0). But in the analogue - if you hook a 10 percent battery to it and sent a 40 percent signal to the looped input - it will give oyu 40 percent output.

Its probably completelly same solutio as the OR gate - jsut with cutting the different wire for reset. Probably not easier in any way.
2011-03-02 07:25:00

Author:
Agarwel
Posts: 207


All that stuff you guys have said is really top stuff, but I can think of an easier, however slightly disappointing method, especially if you really love logic.

Why don't you just have a sackbot in a controllinator and record movements, or maybe, using a sequencer and use batteries to override the sackbot to certain movements, and the controllinator converts those movements into a signal.

What did I just say...

I don't know if that idea I just mentioned up there will work, and the idea you guys have come up with probably works best, but if you don't have any ideas left, I'd say it's worth a shot.

Also can someone explain to me what an analogue signal is?
2011-03-02 07:39:00

Author:
mutant_red_peas
Posts: 516


All that stuff you guys have said is really top stuff, but I can think of an easier, however slightly disappointing method, especially if you really love logic.

Why don't you just have a sackbot in a controllinator and record movements, or maybe, using a sequencer and use batteries to override the sackbot to certain movements, and the controllinator converts those movements into a signal.


The difference between the approach I used, and what you described, is that mine can record movements during gameplay. It's not just a sequence of movements that I act out in create mode (the sackbots' built-in recording system can do that better than anything I could create) - players of my level will be able to act out what they want the sackbot to do, and the sackbot will do it, repeatedly.


Also can someone explain to me what an analogue signal is?

The terms "analog signal" and "digital signal" are used to refer to two different parts of a signal that are carried over wires in LBP2.

The "digital signal" is just an "on/off" kind of signal, with direction. The digital portion of a signal can only be +1, 0, or -1. This is the type of signal that's commonly used for simple things like making a door open or a light turn on.

The "analog signal" can take any value (well, any of a very large selection of values) between -1.0 and +1.0. It is commonly used in the game to do things like adjust the speed with which something happens, or get an estimate of how far along some process is. The thumbsticks on the PS3 controller are "analog joysticks" because they output a wide range of values depending on how far you push the stick: the software can tell the difference between pushing the stick slightly to the right, versus all the way to the right. When playing the game this makes the difference between Sackboy creeping along slowly, or running.

If you want to learn more about analog signals and logic, I recommend Balorn's signal meter: there are other signal meters that show more digits of precision, but not many that show all the different parts of the signal (analog, digital, the sign of both, player color, etc.)
2011-03-02 07:59:00

Author:
tetsujin
Posts: 187


i just wanted to say thank you guys. I've been trying to figure out how to store a player's score, wipe their score clean, and then give it back to them later. this has been hugely helpful (i think... i still have to see if i can make it work once i get home).2011-03-02 20:52:00

Author:
Conall-Star
Posts: 157


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.