Hacker News new | past | comments | ask | show | jobs | submit | keymasta's comments login

I really appreciate the opinion that using args and kwargs is "bad".. It always annoys me when you get them as your parameters.. even worse when you go to declaration and the declaration also contains unlabeled parameters. A lot of wrapper libraries seem to do this. I try to just name every parameter I can. It's so much easier to use this code now that we are using autocomplete in the IDE.


I really like the link you provided and have watched it before!

But - I do want to say that C == green is not arbitrary at all. It is consistent with my calculations, which are consistent with Newton's calculations. Usually I see the colours being assigned to notes as wrong.. but this C == green is consistent with mapping light, using octave equivalence, given by the following:

  f_prime = f * 2 ** (i / 12)
  # Where, 
  # f' is the derived f, (in this case Green {5.66 × 10^14 Hz})
  # f is the reference f (in this case 261.63 Hz)
  # i is the interval in semitones
Let's say that C == 261.63 Hz, and that Green == 5.66 × 10^14 Hz. Using the preceding formula we can make a small (python) program to check whether C == Green.

  light_range_min = 400 * 10 ** 9 # Hz
  light_range_max = 790 * 10 ** 9 # Hz
  C = 261.63 # Hz
  octave = 0
  for octave in range(100): # we are just using a high number here
      f_prime = C * 2 ** (12 * octave / 12)
      if f_prime >= light_range_min:
          octave = octave
          break
  print(f"C in the range of light has f == {f_prime}, which is {f_prime / 10 ** 9} THz. We had to go {octave} octaves up to arrive there")
  # outputs: C in the range of light has f == 561846146826.24, which is 561.84614682624 THz. We had to go 31 octaves up to arrive there
We can look up colour charts like [0] or [1] and find that this frequency is in fact associated with the colour green.

The rest of your commentary seems valid.

[0] https://en.wikipedia.org/wiki/Visible_spectrum

[1] https://sciencestruck.com/color-spectrum-chart


Exactly! It's all made visual and interactive here https://chromatone.center/theory/interplay/spectrum/ - you can even slide the tuning of A4 by dragging left-to-right the last graph - it will show the distribution on 44th octave notes along the visual spectrum


Perceptually, the C pitch class and the color green have nothing to do with each other.


Not sure why I got down voted but the parent has deleted their post so ok! :D


It could be related but I also want to weigh in here and say this. Hypoglycemia can occur with no relation to the other side of diabetic symptoms, i.e, hyperglycemia. In other words there are people who suffer from hypoglycemia without ever getting high blood sugar, and so they are not "diabetic" which would mean you can have issues from both directions.


As a piano/keyboard player, a lot of musicality is possible on a keyboard. It is possible to learn to modify the technique to better utilise the velocity available to a particular keybed, weighted, or non-weighted. When playing keyboards you are working within a subset of the potential dynamics available to a piano. Though expressivity is lessened, there is still a huge palette once you learn to use less total force and less differentiation in force (dynamics).

I know I can play with high musicality on almost any keyboards with velocity, because I was blessed to have learned to use bad instruments. But, it doesn't compare to the depth of the sound generated by all the moving parts and interactions happening in a real piano. Not only the sounds, but also the sheer weight of the keys.

Most* keyboards/vsts are just triggering a (pitch-shifted, looped) sample at a given note and then doing that for n notes and that doing an additive sum.

That is definitely not what occurs in a piano though. There you have the 3-dimensionality of the physical world, like the way waves are traveling through distance and shape. When sounds' harmonics interact, resonant nodes in overtone sequences can trigger each other to resonance, which can trigger other resonances throughout the tone. Maybe you know the feeling of depressing the sustain/damper pedal while sitting in front of it and giving the instrument a smack (or holding down the keys you are not playing and doing it). Or running your nail or a pick over all the low notes with sustain.. like you are in a cave.

In midi/digital, there's the fact that dynamic is usually gonna be 8-bit. Just because midi did that and it made sense at the time, other keyboards and VSTs mostly follow suit. I'm surprised this gets generally passed over. Obviously there's more than 128 strengths of note in real life.

But all that said I think it's possible to learn keyboards/music theory/songs/playing on a non-weighted keyboard, but false to say that digital/non-weighted is equivalent to acoustic piano. But you only really need that for really dynamic music like Jazz, Classical, Instrumental et al. But it feels so very wrong to play that kind of music on bad keyboards.

* Roland V-Piano, and PianoTeq, as well as many I'm unaware of do in fact use physical/acoustic modeling as opposed to triggering samples, but it has not been predominant even among high-end digital instruments


And then you can see that the bitrate is 2-20x better. I personally get bothered by anything under CD quality (44.1kHz 16-bit) so all these platforms are basically unlistenable for me.


> either with therapy, medication, supportive people around them, or a mix of all of those

I feel like you forgot the primary thing that would help people to stop thinking of ending it: being able to afford necessities.


It breaks my heart that this is the case. Honestly, even online you hear so much about people struggling with everything from affording food, to hoping that they'll ever be able to pay off their debts or even afford a place to live. :(


I've been using Firefox for about as long as I can remember, and really don't notice sites not working. I do notice, however, that using any browser without UBO makes my eyes bleed in an unending agony of capitalist garbage. It's like using a browser and then putting sand in your eyeballs.


Kind of awesome how Behringer went from being the crappy version of gear to being the generic, affordable version of actually good gear within the past ~10-15ish years.

When I was selling gear just before my estimated time-line it was known to be basically Yamaha* or Peavey-ish company (does a very wide line of products at affordable prices), but "ever-so-slightly" crapish. Since then they have become a/the goto if you want essentially Moog or those other big names for less than 1 carrot.

I have a Prophet 5 v2 so no real need for me (in terms of analogue synth), but great to see this kind of stuff getting into the hands of more people.

Sure, the pots, etc. aren't quite as solid as the big ($) versions, but that kind-of doesn't matter at all, for a lot of use cases.

I might even get one of their thingies at some point. For less than the price of a beater car it's become a tempting case to have GAS [0] for Behringer [1].

[0] https://library.oapen.org/handle/20.500.12657/48282

[1] https://www.sweetwater.com/c510--Behringer--Synthesizers

*Yamaha actually makes a lot of very high-end gear as well, from piano to guitar, they have fairly extensive custom-shop stuff. I brought them up because, in addition to handling mid and high-end gear, they always made really quality entry-level gear as well.


Yup, I had a deepmind 12. Kinda regret selling it. The keyboard and build were decent. I found you had to menu dive the built in FX to make interesting sounds, but as a unique synthesizer it was a very good entry :). I also have a small xenyx mixer which was basically fine.


What if I want to name arbitrary text in the ligature instead of your list of chords? What if I disagree with how you spell minor as 'm' whereas I want 'mi' or even '-'. How about things like half-diminished, which is often written as 'ø7' vs. calling it a mi7(♭5), like a particular music school I went to prefers. Also, if you're sticking to possible chords qualities, it's 2 * 12 == 4096. I've implemented functions that return the spelling of chord quality over that range, and can return a "proper" answer dependent on rules, but I think in your case you could/should be letting the user call the chord anything they want.

Your presets didn't even include the chord D6 for example. Why have 7th chords like A7 and not have A6? So either cover the chords, or don't pretend that it supports chords. You could change it to say "supports chords that [you] in particular have heard of". Unless there is a way to switch into that mode (where I can speak chords)? I noticed the first test string of \am7\ works, but can't get flats or sharps to work. It really should accept text like this:

  Abmi6(#5,add9)/Db5
, or anything you want to write. I have a use-case where I invented a new way to describe chords, so any possibilities in the "normal" world of music don't apply. I also have a use-case where I want to be able to say any of the 12 * 2 * 12 things squared (squared because of "slash notation" adding a whole new identity to the chord symbol) what you could potentially be able to say in 12 roots 12 tone harmony with an extra component in the bass. There are 2415919104 possible inputs to this, but the thing is, there are multiple ways to spell that.

I propose you do a chord spelling where to font only accepts capitalized letters as note names. Then you can use 'b' as flat '♭' and have no conflict with the note-name called B.

Also you can specify chords using numbers. Numbers accept accidentals before the number part of the string as opposed to after in the case of "alphabet" note names. And numbers can be spelled either "Nashville" like 1,2mi,3, or "Roman" like the following example. Notice to that in that one any minor or diminished or half-diminished chords use lowercase numerals.

  Summertime - Gershwin
  |Imi | iimi7(b5) V7 | Imi | |
  |ivmi7 | | bVI7 V7 | ...
You could use numeral-glyph substitution when encountering substrings with consecutive members of "IiVv" that are also valid numerals.

Also it would be nice to be able to use the character, '|', to add measure lines, fer countin', fer the slower ones out there like yours truly. I could see this as being useful if it could be used a little more comprehensively, like in the ways I've outlined.

"Easy" thing for you to do to improve this drastically is to make it so you can just have any old text you want in between the backslashes. Or have another entry point in the font where that is possible.


Not sure why you got downvoted as well, that was very educating.

I never studied music theory, but I play guitar for >20 years, so I just picked some library I found that listed a few common chords, and put it there.

I never (knowingly) played a D6, so didn’t know to look for that one in particular :)

I’ll add the option extend the list, and see if I can find a better list of defaults.

The thing about those ligatures is that each one adds a bit to the font’s weight, they’re not referencing one another - it’s a lot of duplicated “paths” (and IIRC I can define up to 65,536 in total).


Another thing about these chords ligatures is that they are “zero-width”. When you type /a/ it will get replaced with a the ligature for the A chords, which is a the shape of “A”, above the line (translateY: -150%), and report “advanceWidth: 0”, so the next character shares the same X position. Now, if you want to add m6 to it, I technically cannot support rendering it “to the right of the A”, since its width was set to 0. So I need to pack the font itself with both the A and the Am6 ligatures…

I think a more “advanced” use case like the one you described can be addressed by something like https://lilypond.org


> since its width was set to 0

Is this totally necessary? My question is genuine. I don't know much about font programming.

> I’ll add the option extend the list, and see if I can find a better list of defaults.

If the values have to be hard-coded. If you can get me a contact info, I could send you the master list of chords.. maybe you could use that. My username is not really figurative.

I could see multiple "versions" of the font. There are different conventions one could use to spell chords. Even something like Hal Leonard vs. Sher use different conventions. There's symbol shorthands, like writing aug vs. + or even ma7 vs. '△7'. Dim vs. a circle. There are quite a few different ways to do it so I think it could be cool if you could pick a version. But I could be overcomplicating this.

> I think a more “advanced” use case like the one you described can be addressed by something like https://lilypond.org

Lilypond is a music engraving system. That means that it is producing sheet music. That isn't really overlapping with what you're making as that is not sheet music, but more of a shorthand. I'm actually more interested in the kind of approach you're doing, as I hate sheet music. For me, what music notation needs is simply the chord, and the time. That's why I mentioned the use of '|' to indicate bar lines. Actually writing down and reading individual notes is something that basically takes years to learn, and I don't consider it in line with my (subjective) definition of modern music. Usually by the time people learn to read sheet music, they've completely missed real "playing", with all the effort going into sheet music instead. If you're someone who improvises, you just need the harmonic structure (chords over time).

So another question which might be simple-to-answer would be, can we make a font that just has some kind of thing (glyph, symbol, unicode code point) which raises the thing above the thing? Or do we absolutely need to hardcode it.


What you suggested lastly is possible, most work will be coming up with a dumbed down editor for such a font. Per each ligature, the user should be able to provide a SVG(?) and control its y-offset and scale (currently I use the same values for all the ligatures).

DM me at Twitter (@verydutzi) if you want to talk about it, I’d be happy to!


D6 is the first chord in Beatles - Fool On The Hill. It's the second moment in Neil Young - Harvest Moon.


I'm not sure why I got down-voted, but I guess I could rephrase and establish my tone better. My previous comment could have come out as being critical. I just wanted to ask, would it possible/worth it time-wise to do a similar thing but support imputing more different strings into the ligature part? This is really cool, and I could totally see using it, if you could a few more chords. Great work! This would cover a lot of different tunes really well, and is a way better presentation then you normally get using plaintext and two separate lines.


TL;DR: Don't eat carbs

Am type 1 diabetic; can confirm that abstaining from raising blood sugar is even simpler than consuming carbs + insulin. The first option of abstinence is an empty equation, which is easy to reason about, where the second case involves addition between two (theoretically cancelling) variables, which is prone to variation and/or error.

When you are diabetic, especially Type I (which is more severe), your food consumption on the momentary level is dictated by the push and pull of insulin vs. carbs. So, to be the devil's advocate, let's say you follow the general recommendation and eat essentially what you feel like and match it correctly with insulin. You would take your measurement/estimation of the result of summing the insulin's graph with the food's graph and you achieve a difference of +/-0 mmol/L glucose/blood over some period of time. That's not going to be a flat line because insulin has a generic shape, whereas foods have their own individual shapes (on the graph), but you're generally doing pretty well if there's no total variation at the end. That can be almost as good as just not eating carbs, but that's also assuming that there aren't negative effects of taking external insulin besides erratic blood sugar.

There are just less moving parts if you eat real food (vegetables, meat, nuts, oils) and skip filler (bread, pasta, potato, sweets, pops). Then are you also consuming food with significant nutritional content per calorie. I would even go further and say that this kind of diet would likely benefit the health of non-diabetics as well. It's literally better food, and for me has gotten to the point where I think of carbs as basically garbage. I still eat them, and do insulin, but am just pointing out how much better it is to just factor it out where possible.

And then if you're gonna eat carbs you can pick lesser evils, like brown things vs. white things. Or rice vs. wheat. Or diluted fruit juice (let's say with sparkly water) vs. Coke. This reduces both variables in the equation, the up (carbs) and down (insulin), which makes the entire equation less drastic to balance. So this is really basic math (0 vs. an equation with two vars) in terms of what the solution to diabetics' diets is.

This opinion probably not backed by the FDA but I've heard that cinnamon and yams/sweet potatoes can passively help with blood sugar control in a gentle kind of sense.


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: