|
I'm not sure what you mean in this context. I think we're talking about two different things.
Real programmers use butterflies
|
|
|
|
|
I doubt the front-end compiler creates different IL code for "if (intVarImpicitlyCastToBool) { }" and "if (intVar != 0) { }". So your hesitancy is baseless. But I could be wrong, because I don't know if C# is that stupid.
|
|
|
|
|
Oh I see what you mean. My experience with C# is that the compiler does very little optimization, even in release builds. Either way, the cast isn't necessary, and IMO doesn't add more clarity than a const would. And frankly, I don't think the zero is bad either, but maybe that's just from decades of treating 0 and false as functionally equivalent as it is in the C world.
Real programmers use butterflies
|
|
|
|
|
Oh, I think maybe i misunderstood what you were asking. Somewhere in the code it sees if _timingTimestamp is zero. If it is, it knows that's the first message. It will clear _timingTimestamp if the messages wind up dropping off or otherwise getting too far apart (timeout)
Real programmers use butterflies
|
|
|
|
|
If you are using the same timing message for the regular 24/beat as the console window sends, you will never be able to tell which is which. And you can't make the appropriate adjustment.
|
|
|
|
|
Umm. I don't need to differentiate which is which, I only need to know how far apart they occur.
A MIDI time clock signal is sent 24 times per quarter note.
That's all my tap tempo transmitter does.
The recorder sees these MIDI time clock signals.
Its job is simply to use them to determine the tempo solely based on how far apart they occur, and adjust its tempo accordingly when it sees them.
I don't need to distinguish between different clock signals (like beginning and end). there is no such concept in the MIDI wire protocol anyway.
Real programmers use butterflies
|
|
|
|
|
I was under the impression that you internally used _timeStamp...'s in the internal processing of the main program. In other words, they were already embedded in the stream for timing purposes. Good luck getting to the bottom of everything!
|
|
|
|
|
Windows performs context switches at a pace that I would call manic, so I don't think it would account for the 20 msecs unless there is semaphore contention or something else going on.
|
|
|
|
|
I'm also not using any locks explicitly inside that codepath except when the tempo changes, which doesn't happen *between* messages
Real programmers use butterflies
|
|
|
|
|
If you visit QA much, you'll recognise this ... Modern Art[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Bought right!
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
He also needs the answer ASAP.
|
|
|
|
|
Too good!
|
|
|
|
|
... (thru' with the two step)
|
|
|
|
|
Does a clock radio go off with alarming frequency?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Not something I toc about very often, but if so, it snooze to me.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
That one just Hertz, period.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
OriginalGriff wrote: Does a clock radio go off with alarming frequency?
every time.
|
|
|
|
|
Only if you leave it out of the fridge... ?
|
|
|
|
|
Since most clock radios use a really annoying high-pitched beeper for the alarm sound, yes they do.
Those among you notice the 'meta' nature of this reply should discuss amongst yourselves while everyone else catches up.
Software Zen: delete this;
|
|
|
|
|
If a clock radio goes off - why is it that the first thing everyone does is turn it off?
Wait - is this back to the no-no thing?!
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
|
Accessing a hard disk with an 8 bit processor is a slow affair. No matter how modern that drive may be, you will never get your bytes faster than the processor and the bus can shovel them in.
Serial ATA is no option, simply because my UART and the bus can't keep up with the minimum bit rate. Not by a long shot.
Ok, then it's good old parallel ATA/IDE. The problem here is that even the oldest specification requires a 16 bit data bus. You can use it with an 8 bit bus, but then the upper 8 bits of every 16 bit word would be wasted. You would lose half of your drive's capacity. Since this was last seen on old IBM XT era computers, I also doubt that any reasonably modern file system can live with that.
A common way around this is to put a parallel port between the processor and the drives. That solves the 16 bit problem, but then things get really slow. The processor is more busy with the port's control and data registers than actually sending or receiving bytes. Remember the C64's floppy drives? That sort of slow.
Now, it looks like my little processor's bus is compatible with the drives' controllers. I might even get it to work in DMA mode, speeding up things instead of slowing them down. And I would waste half of the drive's space.
So, what option should I go for? And what file system should I use? FAT16 (or similar) would be the minimum, better FAT32.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
How about something like this[^]?
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
I wish it were that easy, but setting up the tiny computer as USB host is even more complicated.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
modified 1-Jul-20 10:16am.
|
|
|
|